polyglot-sql 0.13.4__cp315-cp315-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1371 @@
1
+ """Polyglot SQL — Rust-powered SQL transpiler for more than 30 SQL dialects."""
2
+
3
+ from typing import Optional, TypedDict
4
+ from .analysis_types import (
5
+ AnalyzeQueryOptions as AnalyzeQueryOptions,
6
+ ValidationSchema as ValidationSchema,
7
+ SchemaTable as SchemaTable,
8
+ SchemaColumn as SchemaColumn,
9
+ SchemaColumnReference as SchemaColumnReference,
10
+ SchemaTableReference as SchemaTableReference,
11
+ SchemaForeignKey as SchemaForeignKey,
12
+ QueryAnalysis as QueryAnalysis,
13
+ QuerySourceSpan as QuerySourceSpan,
14
+ ProjectionFact as ProjectionFact,
15
+ TransformFunctionFact as TransformFunctionFact,
16
+ CteFact as CteFact,
17
+ RelationFact as RelationFact,
18
+ StarProjectionFact as StarProjectionFact,
19
+ SetOperationFact as SetOperationFact,
20
+ SetOperationBranchFact as SetOperationBranchFact,
21
+ ColumnUseFact as ColumnUseFact,
22
+ ColumnUseReferenceFact as ColumnUseReferenceFact,
23
+ ColumnReferenceFact as ColumnReferenceFact,
24
+ ReferenceConfidence as ReferenceConfidence,
25
+ ProjectionNullability as ProjectionNullability,
26
+ TransformKind as TransformKind,
27
+ ColumnUseContext as ColumnUseContext,
28
+ FunctionNameCase as FunctionNameCase,
29
+ FunctionSignature as FunctionSignature,
30
+ FunctionCatalogEntry as FunctionCatalogEntry,
31
+ FunctionCatalogSpec as FunctionCatalogSpec,
32
+ )
33
+
34
+ # Native exports are described by the adjacent public __init__.pyi.
35
+ from polyglot_sql._polyglot_sql import ( # pyright: ignore[reportMissingImports]
36
+ Expression,
37
+ ColumnResolutionError,
38
+ GenerateError,
39
+ ParseError,
40
+ PolyglotError,
41
+ TranspileError,
42
+ ValidationError,
43
+ ValidationErrorInfo,
44
+ ValidationResult,
45
+ _builder_builtin,
46
+ alias_,
47
+ analyze_query,
48
+ and_,
49
+ case,
50
+ col,
51
+ column,
52
+ condition,
53
+ convert,
54
+ delete,
55
+ dialects,
56
+ diff,
57
+ format_sql,
58
+ from_,
59
+ func,
60
+ generate,
61
+ lineage,
62
+ lineage_at,
63
+ lineage_at_with_schema,
64
+ lineage_with_schema,
65
+ insert,
66
+ intersect,
67
+ lit,
68
+ merge_into,
69
+ not_,
70
+ output_columns,
71
+ output_columns_with_schema,
72
+ openlineage_column_lineage,
73
+ openlineage_job_event,
74
+ openlineage_run_event,
75
+ optimize,
76
+ or_,
77
+ parse,
78
+ parse_data_type,
79
+ parse_one,
80
+ qualify_tables,
81
+ rename_tables,
82
+ set_limit,
83
+ set_offset,
84
+ set_order_by,
85
+ source_tables,
86
+ select,
87
+ table_,
88
+ tokenize,
89
+ transpile,
90
+ union,
91
+ update,
92
+ except_,
93
+ extract,
94
+ validate,
95
+ validate_with_schema,
96
+ version as _version,
97
+ )
98
+
99
+
100
+ class ComplexityGuardOptions(TypedDict, total=False):
101
+ """Shared Rust limits. Omit a key for its default; None disables that check.
102
+
103
+ Raising or disabling limits can permit stack exhaustion and process termination.
104
+ """
105
+
106
+ maxParserDepth: Optional[int]
107
+ maxInputBytes: Optional[int]
108
+ maxTokens: Optional[int]
109
+ maxAstNodes: Optional[int]
110
+ maxAstDepth: Optional[int]
111
+ maxParenthesisDepth: Optional[int]
112
+ maxFunctionCallDepth: Optional[int]
113
+
114
+
115
+ def _builtin(name, *args):
116
+ return _builder_builtin(name, *args)
117
+
118
+
119
+ def count(expression):
120
+ return _builtin("count", expression)
121
+
122
+
123
+ def count_star():
124
+ return _builtin("count_star")
125
+
126
+
127
+ def count_distinct(expression):
128
+ return _builtin("count_distinct", expression)
129
+
130
+
131
+ def sum_(expression):
132
+ return _builtin("sum", expression)
133
+
134
+
135
+ def avg(expression):
136
+ return _builtin("avg", expression)
137
+
138
+
139
+ def min_(expression):
140
+ return _builtin("min", expression)
141
+
142
+
143
+ def max_(expression):
144
+ return _builtin("max", expression)
145
+
146
+
147
+ def approx_distinct(expression):
148
+ return _builtin("approx_distinct", expression)
149
+
150
+
151
+ def upper(expression):
152
+ return _builtin("upper", expression)
153
+
154
+
155
+ def lower(expression):
156
+ return _builtin("lower", expression)
157
+
158
+
159
+ def length(expression):
160
+ return _builtin("length", expression)
161
+
162
+
163
+ def trim(expression):
164
+ return _builtin("trim", expression)
165
+
166
+
167
+ def ltrim(expression):
168
+ return _builtin("ltrim", expression)
169
+
170
+
171
+ def rtrim(expression):
172
+ return _builtin("rtrim", expression)
173
+
174
+
175
+ def reverse(expression):
176
+ return _builtin("reverse", expression)
177
+
178
+
179
+ def initcap(expression):
180
+ return _builtin("initcap", expression)
181
+
182
+
183
+ def substring(expression, start, length=None):
184
+ if length is None:
185
+ return _builtin("substring", expression, start)
186
+ return _builtin("substring", expression, start, length)
187
+
188
+
189
+ def replace_(expression, old, new):
190
+ return _builtin("replace", expression, old, new)
191
+
192
+
193
+ def concat_ws(separator, *expressions):
194
+ return _builtin("concat_ws", separator, *expressions)
195
+
196
+
197
+ def coalesce(*expressions):
198
+ return _builtin("coalesce", *expressions)
199
+
200
+
201
+ def null_if(left, right):
202
+ return _builtin("null_if", left, right)
203
+
204
+
205
+ def if_null(expression, fallback):
206
+ return _builtin("if_null", expression, fallback)
207
+
208
+
209
+ def abs_(expression):
210
+ return _builtin("abs", expression)
211
+
212
+
213
+ def round_(expression, decimals=None):
214
+ if decimals is None:
215
+ return _builtin("round", expression)
216
+ return _builtin("round", expression, decimals)
217
+
218
+
219
+ def floor(expression):
220
+ return _builtin("floor", expression)
221
+
222
+
223
+ def ceil(expression):
224
+ return _builtin("ceil", expression)
225
+
226
+
227
+ def power(base, exponent):
228
+ return _builtin("power", base, exponent)
229
+
230
+
231
+ def sqrt(expression):
232
+ return _builtin("sqrt", expression)
233
+
234
+
235
+ def ln(expression):
236
+ return _builtin("ln", expression)
237
+
238
+
239
+ def exp(expression):
240
+ return _builtin("exp", expression)
241
+
242
+
243
+ def sign(expression):
244
+ return _builtin("sign", expression)
245
+
246
+
247
+ def greatest(*expressions):
248
+ return _builtin("greatest", *expressions)
249
+
250
+
251
+ def least(*expressions):
252
+ return _builtin("least", *expressions)
253
+
254
+
255
+ def current_date():
256
+ return _builtin("current_date")
257
+
258
+
259
+ def current_time():
260
+ return _builtin("current_time")
261
+
262
+
263
+ def current_timestamp():
264
+ return _builtin("current_timestamp")
265
+
266
+
267
+ def row_number():
268
+ return _builtin("row_number")
269
+
270
+
271
+ def rank():
272
+ return _builtin("rank")
273
+
274
+
275
+ def dense_rank():
276
+ return _builtin("dense_rank")
277
+
278
+ # Expression subclasses — import all from native module
279
+ from polyglot_sql._polyglot_sql import ( # pyright: ignore[reportMissingImports]
280
+ Abs,
281
+ Add,
282
+ AddMonths,
283
+ AddPartition,
284
+ Adjacent,
285
+ AggregateFunction,
286
+ AIAgg,
287
+ AIClassify,
288
+ AlgorithmProperty,
289
+ Alias,
290
+ Aliases,
291
+ All,
292
+ AllowedValuesProperty,
293
+ AlterColumn,
294
+ AlterIndex,
295
+ AlterSequence,
296
+ AlterSession,
297
+ AlterSet,
298
+ AlterSortKey,
299
+ AlterTable,
300
+ AlterView,
301
+ Analyze,
302
+ AnalyzeDelete,
303
+ AnalyzeHistogram,
304
+ AnalyzeListChainedRows,
305
+ AnalyzeSample,
306
+ AnalyzeStatistics,
307
+ AnalyzeValidate,
308
+ AnalyzeWith,
309
+ And,
310
+ Annotated,
311
+ Anonymous,
312
+ AnonymousAggFunc,
313
+ Any,
314
+ AnyValue,
315
+ Apply,
316
+ ApproxCountDistinct,
317
+ ApproxDistinct,
318
+ ApproxPercentile,
319
+ ApproxPercentileEstimate,
320
+ ApproxQuantile,
321
+ ApproxQuantiles,
322
+ ApproxTopK,
323
+ ApproxTopKAccumulate,
324
+ ApproxTopKCombine,
325
+ ApproxTopKEstimate,
326
+ ApproxTopSum,
327
+ ArgMax,
328
+ ArgMin,
329
+ Array,
330
+ ArrayAgg,
331
+ ArrayAll,
332
+ ArrayAny,
333
+ ArrayAppend,
334
+ ArrayCompact,
335
+ ArrayConcat,
336
+ ArrayConcatAgg,
337
+ ArrayConstructCompact,
338
+ ArrayContainedBy,
339
+ ArrayContains,
340
+ ArrayContainsAll,
341
+ ArrayDistinct,
342
+ ArrayExcept,
343
+ ArrayFilter,
344
+ ArrayFlatten,
345
+ ArrayFunc,
346
+ ArrayIntersect,
347
+ ArrayJoin,
348
+ ArrayLength,
349
+ ArrayOverlaps,
350
+ ArrayPosition,
351
+ ArrayPrepend,
352
+ ArrayRemove,
353
+ ArrayReverse,
354
+ ArraySize,
355
+ ArraySlice,
356
+ ArraySort,
357
+ ArraySum,
358
+ ArrayToString,
359
+ ArrayTransform,
360
+ ArrayUnion,
361
+ ArrayUniqueAgg,
362
+ ArrayZip,
363
+ Ascii,
364
+ Asin,
365
+ Acos,
366
+ AssumeColumnConstraint,
367
+ Atan,
368
+ Atan2,
369
+ AtIndex,
370
+ AtTimeZone,
371
+ Attach,
372
+ AttachOption,
373
+ AutoIncrementColumnConstraint,
374
+ AutoIncrementProperty,
375
+ AutoRefreshProperty,
376
+ Avg,
377
+ BackupProperty,
378
+ Base64DecodeBinary,
379
+ Base64DecodeString,
380
+ Base64Encode,
381
+ Between,
382
+ BitwiseAnd,
383
+ BitwiseAndAgg,
384
+ BitwiseCount,
385
+ BitwiseLeftShift,
386
+ BitwiseNot,
387
+ BitwiseOr,
388
+ BitwiseOrAgg,
389
+ BitwiseRightShift,
390
+ BitwiseXor,
391
+ BitwiseXorAgg,
392
+ BlockCompressionProperty,
393
+ BoolXorAgg,
394
+ Boolean,
395
+ Booland,
396
+ Boolor,
397
+ BracedWildcard,
398
+ BuildProperty,
399
+ ByteLength,
400
+ ByteString,
401
+ Cache,
402
+ Cardinality,
403
+ Case,
404
+ CaseSpecificColumnConstraint,
405
+ Cast,
406
+ CastToStrType,
407
+ Cbrt,
408
+ Ceil,
409
+ Changes,
410
+ CharFunc,
411
+ CharacterSetColumnConstraint,
412
+ CharacterSetProperty,
413
+ CheckColumnConstraint,
414
+ CheckJson,
415
+ CheckXml,
416
+ ChecksumProperty,
417
+ Chr,
418
+ Clone,
419
+ ClusterBy,
420
+ ClusterByColumnsProperty,
421
+ ClusteredByProperty,
422
+ Coalesce,
423
+ Collation,
424
+ CollateProperty,
425
+ Column,
426
+ ColumnConstraint,
427
+ ColumnDef,
428
+ ColumnPosition,
429
+ ColumnPrefix,
430
+ Columns,
431
+ CombinedAggFunc,
432
+ CombinedParameterizedAgg,
433
+ Command,
434
+ Comment,
435
+ CommentColumnConstraint,
436
+ Commit,
437
+ Comprehension,
438
+ Compress,
439
+ CompressColumnConstraint,
440
+ ComputedColumnConstraint,
441
+ Concat,
442
+ ConcatWs,
443
+ ConditionalInsert,
444
+ Connect,
445
+ ConnectByRoot,
446
+ Constraint,
447
+ Contains,
448
+ Convert,
449
+ ConvertTimezone,
450
+ ConvertToCharset,
451
+ Copy,
452
+ CopyParameter,
453
+ Corr,
454
+ Cos,
455
+ CosineDistance,
456
+ Count,
457
+ CountIf,
458
+ CovarPop,
459
+ CovarSamp,
460
+ CreateDatabase,
461
+ CreateFunction,
462
+ CreateIndex,
463
+ CreateProcedure,
464
+ CreateSchema,
465
+ CreateSequence,
466
+ CreateTable,
467
+ CreateTrigger,
468
+ CreateType,
469
+ CreateView,
470
+ FlashbackTable,
471
+ Credentials,
472
+ CredentialsProperty,
473
+ Cte,
474
+ Cube,
475
+ CumeDist,
476
+ CurrentDate,
477
+ CurrentDatetime,
478
+ CurrentSchema,
479
+ CurrentSchemas,
480
+ CurrentTime,
481
+ CurrentTimestamp,
482
+ CurrentTimestampLTZ,
483
+ CurrentUser,
484
+ DPipe,
485
+ DataBlocksizeProperty,
486
+ DataDeletionProperty,
487
+ DataType,
488
+ Date,
489
+ DateAdd,
490
+ DateBin,
491
+ DateDiff,
492
+ DateFormat,
493
+ DateFormatColumnConstraint,
494
+ DateFromParts,
495
+ DateFromUnixDate,
496
+ DateStrToDate,
497
+ DateSub,
498
+ DateToDateStr,
499
+ DateToDi,
500
+ DateTrunc,
501
+ Datetime,
502
+ DatetimeAdd,
503
+ DatetimeDiff,
504
+ DatetimeSub,
505
+ DatetimeTrunc,
506
+ Day,
507
+ DayOfMonth,
508
+ DayOfWeek,
509
+ DayOfWeekIso,
510
+ DayOfYear,
511
+ Dayname,
512
+ Declare,
513
+ DeclareItem,
514
+ Decode,
515
+ DecodeCase,
516
+ DecompressBinary,
517
+ DecompressString,
518
+ Decrypt,
519
+ DecryptRaw,
520
+ DefaultColumnConstraint,
521
+ DefinerProperty,
522
+ Degrees,
523
+ Delete,
524
+ DenseRank,
525
+ Describe,
526
+ Detach,
527
+ DictProperty,
528
+ DictRange,
529
+ DiToDate,
530
+ Directory,
531
+ DistKeyProperty,
532
+ DistStyleProperty,
533
+ DistributeBy,
534
+ DistributedByProperty,
535
+ Div,
536
+ Dot,
537
+ DotProduct,
538
+ DropDatabase,
539
+ DropFunction,
540
+ DropIndex,
541
+ DropNamespace,
542
+ DropPartition,
543
+ DropProcedure,
544
+ DropSchema,
545
+ DropSequence,
546
+ DropTable,
547
+ DropTrigger,
548
+ DropType,
549
+ DropView,
550
+ DuplicateKeyProperty,
551
+ ElementAt,
552
+ Elt,
553
+ Encode,
554
+ EncodeProperty,
555
+ Encrypt,
556
+ EncryptRaw,
557
+ EndsWith,
558
+ EngineProperty,
559
+ EnviromentProperty,
560
+ Epoch,
561
+ EpochMs,
562
+ Eq,
563
+ EqualNull,
564
+ EuclideanDistance,
565
+ Except,
566
+ Execute,
567
+ ExecuteAsProperty,
568
+ Exists,
569
+ Exp,
570
+ Explode,
571
+ ExplodeOuter,
572
+ ExplodingGenerateSeries,
573
+ Export,
574
+ ExtendsLeft,
575
+ ExtendsRight,
576
+ ExternalProperty,
577
+ Extract,
578
+ FallbackProperty,
579
+ FarmFingerprint,
580
+ FeaturesAtTime,
581
+ Fetch,
582
+ FileFormatProperty,
583
+ Filter,
584
+ First,
585
+ FirstValue,
586
+ Float64,
587
+ Floor,
588
+ ForIn,
589
+ ForeignKey,
590
+ Format,
591
+ FormatDate,
592
+ FormatPhrase,
593
+ FreespaceProperty,
594
+ From,
595
+ FromBase,
596
+ FromTimeZone,
597
+ FromUnixtime,
598
+ Function,
599
+ Upsert,
600
+ StorageProperty,
601
+ Hierarchy,
602
+ ViewParameter,
603
+ Call,
604
+ FunctionEmits,
605
+ GapFill,
606
+ Generate,
607
+ GenerateDateArray,
608
+ GenerateEmbedding,
609
+ GenerateSeries,
610
+ GenerateTimestampArray,
611
+ GeneratedAsIdentityColumnConstraint,
612
+ GeneratedAsRowColumnConstraint,
613
+ Get,
614
+ Getbit,
615
+ GetExtract,
616
+ Glob,
617
+ Grant,
618
+ GrantPrincipal,
619
+ GrantPrivilege,
620
+ Greatest,
621
+ Group,
622
+ GroupBy,
623
+ GroupConcat,
624
+ Grouping,
625
+ GroupingId,
626
+ GroupingSets,
627
+ Gt,
628
+ Gte,
629
+ HashAgg,
630
+ Having,
631
+ HavingMax,
632
+ Heredoc,
633
+ Hex,
634
+ HexEncode,
635
+ HexStringExpr,
636
+ Hint,
637
+ HistoricalData,
638
+ Hll,
639
+ Hour,
640
+ ILike,
641
+ IfFunc,
642
+ IfNull,
643
+ Identifier,
644
+ In,
645
+ IncludeProperty,
646
+ Index,
647
+ IndexColumnConstraint,
648
+ IndexConstraintOption,
649
+ IndexParameters,
650
+ IndexTableHint,
651
+ Initcap,
652
+ InOutColumnConstraint,
653
+ InputModelProperty,
654
+ InputOutputFormat,
655
+ InheritsProperty,
656
+ Insert,
657
+ Install,
658
+ Int64,
659
+ IntDiv,
660
+ Intersect,
661
+ Interval,
662
+ IntervalOp,
663
+ IntervalSpan,
664
+ IntoClause,
665
+ Introducer,
666
+ Is,
667
+ IsFalse,
668
+ IsInf,
669
+ IsJson,
670
+ IsNan,
671
+ IsNull,
672
+ IsTrue,
673
+ IsolatedLoadingProperty,
674
+ JSON,
675
+ JSONArray,
676
+ JSONArrayAgg,
677
+ JSONArrayAppend,
678
+ JSONArrayContains,
679
+ JSONArrayInsert,
680
+ JSONBContains,
681
+ JSONBContainsAllTopKeys,
682
+ JSONBContainsAnyTopKeys,
683
+ JSONBDeleteAtPath,
684
+ JSONBExists,
685
+ JSONBExtract,
686
+ JSONBExtractScalar,
687
+ JSONBObjectAgg,
688
+ JSONBool,
689
+ JSONCast,
690
+ JSONColumnDef,
691
+ JSONExists,
692
+ JSONExtract,
693
+ JSONExtractArray,
694
+ JSONExtractQuote,
695
+ JSONExtractScalar,
696
+ JSONFormat,
697
+ JSONKeyValue,
698
+ JSONKeys,
699
+ JSONKeysAtDepth,
700
+ JSONObject,
701
+ JSONObjectAgg,
702
+ JSONPath,
703
+ JSONPathFilter,
704
+ JSONPathKey,
705
+ JSONPathRecursive,
706
+ JSONPathRoot,
707
+ JSONPathScript,
708
+ JSONPathSelector,
709
+ JSONPathSlice,
710
+ JSONPathSubscript,
711
+ JSONPathUnion,
712
+ JSONRemove,
713
+ JSONSchema,
714
+ JSONSet,
715
+ JSONStripNulls,
716
+ JSONTable,
717
+ JSONType,
718
+ JSONValue,
719
+ JSONValueArray,
720
+ JarowinklerSimilarity,
721
+ Join,
722
+ JoinHint,
723
+ JoinedTable,
724
+ JournalProperty,
725
+ JsonArray,
726
+ JsonArrayAgg,
727
+ JsonArrayLength,
728
+ JsonExtract,
729
+ JsonExtractPath,
730
+ JsonExtractScalar,
731
+ JsonInsert,
732
+ JsonKeys,
733
+ JsonMergePatch,
734
+ JsonObject,
735
+ JsonObjectAgg,
736
+ JsonQuery,
737
+ JsonRemove,
738
+ JsonSet,
739
+ JsonType,
740
+ JsonValue,
741
+ Kill,
742
+ Lag,
743
+ Lambda,
744
+ LanguageProperty,
745
+ Last,
746
+ LastDay,
747
+ LastValue,
748
+ Lateral,
749
+ LateralView,
750
+ Lead,
751
+ Least,
752
+ Left,
753
+ Length,
754
+ Levenshtein,
755
+ Like,
756
+ LikeProperty,
757
+ Limit,
758
+ LimitOptions,
759
+ List,
760
+ ListAgg,
761
+ Literal,
762
+ Ln,
763
+ LoadData,
764
+ Localtime,
765
+ Localtimestamp,
766
+ LocationProperty,
767
+ Lock,
768
+ LockProperty,
769
+ LockingProperty,
770
+ LockingStatement,
771
+ Log,
772
+ LogProperty,
773
+ LogicalAnd,
774
+ LogicalOr,
775
+ Lower,
776
+ LowerHex,
777
+ Lpad,
778
+ LTrim,
779
+ MLForecast,
780
+ MLTranslate,
781
+ MD5Digest,
782
+ MD5NumberLower64,
783
+ MD5NumberUpper64,
784
+ MakeDate,
785
+ MakeInterval,
786
+ MakeTimestamp,
787
+ ManhattanDistance,
788
+ Map,
789
+ MapCat,
790
+ MapConcat,
791
+ MapContainsKey,
792
+ MapDelete,
793
+ MapFromArrays,
794
+ MapFromEntries,
795
+ MapFunc,
796
+ MapInsert,
797
+ MapKeys,
798
+ MapPick,
799
+ MapValues,
800
+ MaskingPolicyColumnConstraint,
801
+ Match,
802
+ MatchAgainst,
803
+ MatchRecognize,
804
+ MatchRecognizeMeasure,
805
+ MaterializedProperty,
806
+ Max,
807
+ Median,
808
+ MemberOf,
809
+ Merge,
810
+ MergeBlockRatioProperty,
811
+ MergeTreeTTL,
812
+ MergeTreeTTLAction,
813
+ MethodCall,
814
+ Min,
815
+ Minhash,
816
+ Minute,
817
+ Mod,
818
+ ModFunc,
819
+ Mode,
820
+ ModelAttribute,
821
+ Month,
822
+ MonthsBetween,
823
+ Monthname,
824
+ Mul,
825
+ MultitableInserts,
826
+ NTile,
827
+ NamedArgument,
828
+ NamedStruct,
829
+ Neg,
830
+ Neq,
831
+ NextDay,
832
+ NextValueFor,
833
+ Normal,
834
+ Normalize,
835
+ Not,
836
+ NotNullColumnConstraint,
837
+ Ntile,
838
+ Null,
839
+ NullIf,
840
+ Nullif,
841
+ NullSafeEq,
842
+ NullSafeNeq,
843
+ NumberToStr,
844
+ Nvl,
845
+ Nvl2,
846
+ NthValue,
847
+ ObjectAgg,
848
+ ObjectIdentifier,
849
+ ObjectInsert,
850
+ Offset,
851
+ OnCluster,
852
+ OnCommitProperty,
853
+ OnCondition,
854
+ OnConflict,
855
+ OnProperty,
856
+ Opclass,
857
+ OpenJSON,
858
+ OpenJSONColumnDef,
859
+ Operator,
860
+ OptionsProperty,
861
+ Or,
862
+ Ordered,
863
+ OrderBy,
864
+ OutputModelProperty,
865
+ Over,
866
+ OverflowTruncateBehavior,
867
+ Overlaps,
868
+ Overlay,
869
+ Pad,
870
+ Parameter,
871
+ ParameterizedAgg,
872
+ Paren,
873
+ ParseDatetime,
874
+ ParseIp,
875
+ ParseJSON,
876
+ ParseJson,
877
+ ParseTime,
878
+ ParseUrl,
879
+ Partition,
880
+ PartitionBoundSpec,
881
+ PartitionByListProperty,
882
+ PartitionByProperty,
883
+ PartitionByRangeProperty,
884
+ PartitionByRangePropertyDynamic,
885
+ PartitionByTruncate,
886
+ PartitionList,
887
+ PartitionRange,
888
+ PartitionedByBucket,
889
+ PartitionedByProperty,
890
+ PartitionedOfProperty,
891
+ PathColumnConstraint,
892
+ Percentile,
893
+ PercentileCont,
894
+ PercentileDisc,
895
+ PercentRank,
896
+ PeriodForSystemTimeConstraint,
897
+ Pi,
898
+ PipeOperator,
899
+ Pivot,
900
+ PivotAlias,
901
+ PivotAny,
902
+ Placeholder,
903
+ Position,
904
+ Power,
905
+ Pragma,
906
+ Prepare,
907
+ PreWhere,
908
+ Predict,
909
+ PreviousDay,
910
+ PrimaryKey,
911
+ PrimaryKeyColumnConstraint,
912
+ Prior,
913
+ ProjectionDef,
914
+ Properties,
915
+ Property,
916
+ PropertyEQ,
917
+ Pseudocolumn,
918
+ PseudoType,
919
+ Put,
920
+ Qualify,
921
+ Quantile,
922
+ Quarter,
923
+ QueryBand,
924
+ QueryOption,
925
+ QueryTransform,
926
+ RTrim,
927
+ Radians,
928
+ Rand,
929
+ Random,
930
+ Randn,
931
+ Randstr,
932
+ RangeBucket,
933
+ RangeN,
934
+ Rank,
935
+ Raw,
936
+ ReadCSV,
937
+ ReadParquet,
938
+ RecursiveWithSearch,
939
+ Reduce,
940
+ Reference,
941
+ Refresh,
942
+ RefreshTriggerProperty,
943
+ RegexpCount,
944
+ RegexpExtract,
945
+ RegexpExtractAll,
946
+ RegexpFullMatch,
947
+ RegexpILike,
948
+ RegexpInstr,
949
+ RegexpLike,
950
+ RegexpReplace,
951
+ RegexpSplit,
952
+ RegrAvgx,
953
+ RegrAvgy,
954
+ RegrCount,
955
+ RegrIntercept,
956
+ RegrR2,
957
+ RegrSlope,
958
+ RegrSxx,
959
+ RegrSxy,
960
+ RegrSyy,
961
+ RegrValx,
962
+ RegrValy,
963
+ RemoteWithConnectionModelProperty,
964
+ RenameColumn,
965
+ Repeat,
966
+ Replace,
967
+ ReplacePartition,
968
+ ReturnStmt,
969
+ Returning,
970
+ ReturnsProperty,
971
+ Reverse,
972
+ Revoke,
973
+ Right,
974
+ Rollback,
975
+ Rollup,
976
+ RollupProperty,
977
+ Round,
978
+ RowFormatDelimitedProperty,
979
+ RowFormatProperty,
980
+ RowFormatSerdeProperty,
981
+ RowNumber,
982
+ RowsFrom,
983
+ Rpad,
984
+ SHA,
985
+ SHA1Digest,
986
+ SHA2,
987
+ SHA2Digest,
988
+ SafeAdd,
989
+ SafeCast,
990
+ SafeDivide,
991
+ SafeMultiply,
992
+ SafeSubtract,
993
+ SampleProperty,
994
+ Schema,
995
+ SchemaCommentProperty,
996
+ ScopeResolution,
997
+ Search,
998
+ SearchIp,
999
+ Second,
1000
+ SecurityProperty,
1001
+ Select,
1002
+ SemanticView,
1003
+ Sequence,
1004
+ SequenceProperties,
1005
+ SerdeProperties,
1006
+ SessionParameter,
1007
+ SessionUser,
1008
+ Set,
1009
+ SetConfigProperty,
1010
+ SetItem,
1011
+ SetOperation,
1012
+ SetProperty,
1013
+ SetStatement,
1014
+ SettingsProperty,
1015
+ SharingProperty,
1016
+ Show,
1017
+ Sign,
1018
+ SimilarTo,
1019
+ Sin,
1020
+ Skewness,
1021
+ Slice,
1022
+ SortArray,
1023
+ SortBy,
1024
+ SortKeyProperty,
1025
+ Soundex,
1026
+ Split,
1027
+ SplitPart,
1028
+ SplitTable,
1029
+ SqlComment,
1030
+ SqlReadWriteProperty,
1031
+ SqlSecurityProperty,
1032
+ Sqrt,
1033
+ StDistance,
1034
+ StPoint,
1035
+ StabilityProperty,
1036
+ StageReference,
1037
+ StandardHash,
1038
+ Star,
1039
+ StarMap,
1040
+ StartsWith,
1041
+ Stddev,
1042
+ StddevPop,
1043
+ StddevSamp,
1044
+ StorageHandlerProperty,
1045
+ StrPosition,
1046
+ StrToDate,
1047
+ StrToMap,
1048
+ StrToTime,
1049
+ StrToUnix,
1050
+ Stream,
1051
+ StringAgg,
1052
+ StringFunc,
1053
+ StringToArray,
1054
+ Struct,
1055
+ StructExtract,
1056
+ StructFunc,
1057
+ Stuff,
1058
+ Sub,
1059
+ Subquery,
1060
+ Subscript,
1061
+ Substring,
1062
+ SubstringIndex,
1063
+ Sum,
1064
+ SumIf,
1065
+ Summarize,
1066
+ Systimestamp,
1067
+ Table,
1068
+ TableAlias,
1069
+ TableArgument,
1070
+ TableFromRows,
1071
+ TableSample,
1072
+ Tag,
1073
+ Tags,
1074
+ Tan,
1075
+ TemporaryProperty,
1076
+ Time,
1077
+ TimeAdd,
1078
+ TimeDiff,
1079
+ TimeFromParts,
1080
+ TimeSlice,
1081
+ TimeStrToDate,
1082
+ TimeStrToTime,
1083
+ TimeStrToUnix,
1084
+ TimeSub,
1085
+ TimeToStr,
1086
+ TimeToUnix,
1087
+ TimeTrunc,
1088
+ TimeUnit,
1089
+ Timestamp,
1090
+ TimestampAdd,
1091
+ TimestampDiff,
1092
+ TimestampFromParts,
1093
+ TimestampSub,
1094
+ TimestampTrunc,
1095
+ TimestampTzFromParts,
1096
+ ToArray,
1097
+ ToBoolean,
1098
+ ToBinary,
1099
+ ToChar,
1100
+ ToDate,
1101
+ ToDecfloat,
1102
+ ToDouble,
1103
+ ToFile,
1104
+ ToJson,
1105
+ ToMap,
1106
+ ToNumber,
1107
+ ToTableProperty,
1108
+ ToTimestamp,
1109
+ Transaction,
1110
+ Transform,
1111
+ TransformKeys,
1112
+ TransformModelProperty,
1113
+ TransformValues,
1114
+ TransientProperty,
1115
+ Translate,
1116
+ TranslateCharacters,
1117
+ Trim,
1118
+ Truncate,
1119
+ TruncFunc,
1120
+ TruncateTable,
1121
+ TryCast,
1122
+ TryCatch,
1123
+ TryBase64DecodeBinary,
1124
+ TryBase64DecodeString,
1125
+ TryToDecfloat,
1126
+ TsMatch,
1127
+ TsOrDiToDi,
1128
+ TsOrDsAdd,
1129
+ TsOrDsDiff,
1130
+ TsOrDsToDate,
1131
+ TsOrDsToDatetime,
1132
+ TsOrDsToTime,
1133
+ TsOrDsToTimestamp,
1134
+ Tuple,
1135
+ Typeof,
1136
+ Uncache,
1137
+ Unhex,
1138
+ Unicode,
1139
+ UnicodeString,
1140
+ Uniform,
1141
+ Union,
1142
+ UniqueColumnConstraint,
1143
+ UniqueKeyProperty,
1144
+ UnixDate,
1145
+ UnixMicros,
1146
+ UnixMillis,
1147
+ UnixSeconds,
1148
+ UnixTimestamp,
1149
+ UnixToStr,
1150
+ UnixToTime,
1151
+ UnixToTimeStr,
1152
+ Unnest,
1153
+ Unpivot,
1154
+ UnpivotColumns,
1155
+ Update,
1156
+ Upper,
1157
+ Use,
1158
+ UserDefinedFunction,
1159
+ UsingData,
1160
+ UsingTemplateProperty,
1161
+ UtcTime,
1162
+ UtcTimestamp,
1163
+ Uuid,
1164
+ Values,
1165
+ Var,
1166
+ VarMap,
1167
+ VarPop,
1168
+ VarSamp,
1169
+ Variadic,
1170
+ Variance,
1171
+ VectorSearch,
1172
+ Version,
1173
+ Vertica,
1174
+ ViewAttributeProperty,
1175
+ VolatileProperty,
1176
+ WatermarkColumnConstraint,
1177
+ Week,
1178
+ When,
1179
+ Whens,
1180
+ Where,
1181
+ WidthBucket,
1182
+ Window,
1183
+ WindowFunction,
1184
+ WindowSpec,
1185
+ With,
1186
+ WithDataProperty,
1187
+ WithFill,
1188
+ WithJournalTableProperty,
1189
+ WithOperator,
1190
+ WithProcedureOptions,
1191
+ WithSchemaBindingProperty,
1192
+ WithSystemVersioningProperty,
1193
+ WithTableHint,
1194
+ WithinGroup,
1195
+ XMLElement,
1196
+ XMLGet,
1197
+ XMLKeyValueOption,
1198
+ XMLTable,
1199
+ XmlNamespace,
1200
+ Xor,
1201
+ Year,
1202
+ YearOfWeek,
1203
+ YearOfWeekIso,
1204
+ Zipf,
1205
+ DateStrToDate,
1206
+ DateToDateStr,
1207
+ )
1208
+
1209
+ format = format_sql
1210
+ __version__ = _version()
1211
+
1212
+ __all__ = [
1213
+ "AnalyzeQueryOptions",
1214
+ "ValidationSchema",
1215
+ "SchemaTable",
1216
+ "SchemaColumn",
1217
+ "SchemaColumnReference",
1218
+ "SchemaTableReference",
1219
+ "SchemaForeignKey",
1220
+ "QueryAnalysis",
1221
+ "QuerySourceSpan",
1222
+ "ProjectionFact",
1223
+ "TransformFunctionFact",
1224
+ "CteFact",
1225
+ "RelationFact",
1226
+ "StarProjectionFact",
1227
+ "SetOperationFact",
1228
+ "SetOperationBranchFact",
1229
+ "ColumnUseFact",
1230
+ "ColumnUseReferenceFact",
1231
+ "ColumnReferenceFact",
1232
+ "ReferenceConfidence",
1233
+ "ProjectionNullability",
1234
+ "TransformKind",
1235
+ "ColumnUseContext",
1236
+ "FunctionNameCase",
1237
+ "FunctionSignature",
1238
+ "FunctionCatalogEntry",
1239
+ "FunctionCatalogSpec",
1240
+ "ComplexityGuardOptions",
1241
+ "transpile",
1242
+ "parse",
1243
+ "parse_one",
1244
+ "parse_data_type",
1245
+ "generate",
1246
+ "qualify_tables",
1247
+ "rename_tables",
1248
+ "set_limit",
1249
+ "set_offset",
1250
+ "set_order_by",
1251
+ "format_sql",
1252
+ "format",
1253
+ "validate",
1254
+ "validate_with_schema",
1255
+ "optimize",
1256
+ "analyze_query",
1257
+ "lineage",
1258
+ "lineage_at",
1259
+ "lineage_at_with_schema",
1260
+ "lineage_with_schema",
1261
+ "output_columns",
1262
+ "output_columns_with_schema",
1263
+ "source_tables",
1264
+ "openlineage_column_lineage",
1265
+ "openlineage_job_event",
1266
+ "openlineage_run_event",
1267
+ "diff",
1268
+ "tokenize",
1269
+ "dialects",
1270
+ "Expression",
1271
+ "PolyglotError",
1272
+ "ParseError",
1273
+ "GenerateError",
1274
+ "TranspileError",
1275
+ "ValidationError",
1276
+ "ColumnResolutionError",
1277
+ "ValidationResult",
1278
+ "ValidationErrorInfo",
1279
+ "__version__",
1280
+ # SQLGlot-compatible builder subset
1281
+ "select",
1282
+ "from_",
1283
+ "column",
1284
+ "col",
1285
+ "table_",
1286
+ "convert",
1287
+ "lit",
1288
+ "condition",
1289
+ "and_",
1290
+ "or_",
1291
+ "not_",
1292
+ "alias_",
1293
+ "func",
1294
+ "case",
1295
+ "update",
1296
+ "delete",
1297
+ "insert",
1298
+ "union",
1299
+ "intersect",
1300
+ "except_",
1301
+ # Key expression subclasses
1302
+ "Select",
1303
+ "Column",
1304
+ "Table",
1305
+ "Vertica",
1306
+ "Literal",
1307
+ "Identifier",
1308
+ "Star",
1309
+ "Alias",
1310
+ "Cast",
1311
+ "Function",
1312
+ "Upsert",
1313
+ "StorageProperty",
1314
+ "Hierarchy",
1315
+ "ViewParameter",
1316
+ "Call",
1317
+ "AggregateFunction",
1318
+ "WindowFunction",
1319
+ "From",
1320
+ "Join",
1321
+ "Where",
1322
+ "GroupBy",
1323
+ "Having",
1324
+ "OrderBy",
1325
+ "Limit",
1326
+ "With",
1327
+ "Cte",
1328
+ "Subquery",
1329
+ "Union",
1330
+ "Intersect",
1331
+ "Except",
1332
+ "Insert",
1333
+ "Update",
1334
+ "Delete",
1335
+ "TryCatch",
1336
+ "Prepare",
1337
+ "Execute",
1338
+ "Merge",
1339
+ "CreateTable",
1340
+ "DropTable",
1341
+ "AlterTable",
1342
+ "SplitTable",
1343
+ "FlashbackTable",
1344
+ "CreateView",
1345
+ "DropView",
1346
+ "And",
1347
+ "Or",
1348
+ "Not",
1349
+ "Eq",
1350
+ "In",
1351
+ "Between",
1352
+ "Like",
1353
+ "Case",
1354
+ "DataType",
1355
+ "Boolean",
1356
+ "Null",
1357
+ "Interval",
1358
+ "Array",
1359
+ "Struct",
1360
+ "Values",
1361
+ "Ordered",
1362
+ "Window",
1363
+ "Over",
1364
+ "Lambda",
1365
+ "Paren",
1366
+ "Count",
1367
+ "Sum",
1368
+ "Avg",
1369
+ "Min",
1370
+ "Max",
1371
+ ]