
    hS                       S SK Jr  S SKJr  S SKJrJr  S SKJr  S SK	J
r
  S SKJr  \(       a  S SKJr  S SKJr  \ " S	 S
5      5       r\ " S S5      5       r\ " S S5      5       r\ " S S5      5       r\S   r\S   rg)    )annotations)	dataclass)TYPE_CHECKINGLiteral)issue_unstable_warning)DuplicateError)Schema)datetime)DataTypec                  t    \ rS rSr% SrS\S'   S\S'   S\S'   S\S	'   S\S
'   S\S'   S\S'   S\S'   S\S'   Srg)CatalogInfo   z-Information for a catalog within a metastore.strname
str | Nonecommentdict[str, str]
propertiesoptionsstorage_locationdatetime | None
created_at
created_by
updated_at
updated_by N__name__
__module____qualname____firstlineno____doc____annotations____static_attributes__r       U/home/james-whalen/.local/lib/python3.13/site-packages/polars/catalog/unity/models.pyr   r      s:    7
I  r%   r   c                  j    \ rS rSr% SrS\S'   S\S'   S\S'   S\S	'   S
\S'   S\S'   S
\S'   S\S'   Srg)NamespaceInfo   zv
Information for a namespace within a catalog.

This is also known by the name "schema" in unity catalog terminology.
r   r   r   r   r   r   r   r   r   r   r   r   r   Nr   r   r%   r&   r(   r(      s8     I  r%   r(   c                      \ rS rSr% SrS\S'   S\S'   S\S'   S\S	'   S\S
'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   SS jrSrg)	TableInfo1   z Information for a catalog table.r   r   r   r   table_id	TableType
table_typer   zDataSourceFormat | Nonedata_source_formatzlist[ColumnInfo] | Nonecolumnsr   r   r   r   r   r   r   c                    [        S5        U R                  c  g[        5       nU R                   HI  nUR                  U;   a  SUR                   3n[	        U5      eUR                  5       XR                  '   MK     U$ )z
Get the native polars schema of this table.

.. warning::
    This functionality is considered **unstable**. It may be changed
    at any point without it being considered a breaking change.
z9`get_polars_schema` functionality is considered unstable.Nzduplicate column name: )r   r1   r	   r   r   get_polars_dtype)selfschemacolumn_infomsgs       r&   get_polars_schemaTableInfo.get_polars_schemaB   s}     	G	
 <<<<K6)/0@0@/AB$S))'2'C'C'EF##$	 ( r%   r   N)returnzSchema | None)r   r   r    r!   r"   r#   r8   r$   r   r%   r&   r+   r+   1   sP    *
IM  //$$r%   r+   c                  j    \ rS rSr% SrS\S'   S\S'   S\S'   S\S'   S\S	'   S
\S'   S\S'   SS jrSrg)
ColumnInfo[   z0Information for a column within a catalog table.r   r   	type_name	type_text	type_jsonz
int | Nonepositionr   r   partition_indexc                Z    [        S5        SSKJn  UR                  U R                  5      $ )z
Get the native polars datatype of this column.

.. warning::
    This functionality is considered **unstable**. It may be changed
    at any point without it being considered a breaking change.
z8`get_polars_dtype` functionality is considered unstable.r   )PyCatalogClient)r   polars._plrrD   type_json_to_polars_typer@   )r4   rD   s     r&   r3   ColumnInfo.get_polars_dtypeg   s)     	F	
 	077GGr%   r   N)r:   r   )r   r   r    r!   r"   r#   r3   r$   r   r%   r&   r<   r<   [   s1    :
INNNHr%   r<   )MANAGEDEXTERNALVIEWMATERIALIZED_VIEWSTREAMING_TABLEMANAGED_SHALLOW_CLONEFOREIGNEXTERNAL_SHALLOW_CLONE)DELTACSVJSONAVROPARQUETORCTEXTUNITY_CATALOGDELTASHARINGDATABRICKS_FORMATREDSHIFT_FORMATSNOWFLAKE_FORMATSQLDW_FORMATSALESFORCE_FORMATBIGQUERY_FORMATNETSUITE_FORMATWORKDAY_RAAS_FORMAT
HIVE_SERDEHIVE_CUSTOMVECTOR_INDEX_FORMATN)
__future__r   dataclassesr   typingr   r   polars._utils.unstabler   polars.exceptionsr   polars.schemar	   r
   polars.datatypes.classesr   r   r(   r+   r<   r.   DataSourceFormatr   r%   r&   <module>rl      s    " ! ) 9 ,  !1      " & & &R H H H8 		  r%   