polyglot-sql 0.5.13__tar.gz → 0.5.15__tar.gz

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.
Files changed (190) hide show
  1. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/Cargo.lock +5 -5
  2. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/Cargo.toml +1 -1
  3. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/PKG-INFO +1 -1
  4. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/Cargo.toml +1 -1
  5. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/fabric.rs +2 -0
  6. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/mod.rs +73 -12
  7. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/tsql.rs +137 -60
  8. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/generator.rs +306 -13
  9. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/transforms.rs +112 -35
  10. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/common/known_failures.rs +7 -0
  11. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/common/test_runner.rs +6 -6
  12. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/transpilation.json +1 -1
  13. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/fabric_regression.rs +20 -7
  14. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/issue227_strict_unsupported.rs +116 -1
  15. polyglot_sql-0.5.15/crates/polyglot-sql/tests/issue265_distinct_order_nulls.rs +92 -0
  16. polyglot_sql-0.5.15/crates/polyglot-sql/tests/issue266_boolean_test_tsql.rs +106 -0
  17. polyglot_sql-0.5.15/crates/polyglot-sql/tests/issue267_boolean_predicates_tsql_fabric.rs +96 -0
  18. polyglot_sql-0.5.15/crates/polyglot-sql/tests/issue269_positional_order_by_tsql_fabric.rs +94 -0
  19. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/tsql_regression.rs +18 -5
  20. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/README.md +0 -0
  21. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/README.md +0 -0
  22. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/benches/in_list.rs +0 -0
  23. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/benches/parsing.rs +0 -0
  24. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/benches/rust_parsing.rs +0 -0
  25. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/benches/transpile.rs +0 -0
  26. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/examples/basic_usage.rs +0 -0
  27. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/examples/bench_json.rs +0 -0
  28. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/ast_json.rs +0 -0
  29. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/ast_transforms.rs +0 -0
  30. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/builder.rs +0 -0
  31. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/athena.rs +0 -0
  32. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/bigquery.rs +0 -0
  33. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/clickhouse.rs +0 -0
  34. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/cockroachdb.rs +0 -0
  35. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/databricks.rs +0 -0
  36. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/datafusion.rs +0 -0
  37. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/doris.rs +0 -0
  38. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/dremio.rs +0 -0
  39. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/drill.rs +0 -0
  40. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/druid.rs +0 -0
  41. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/duckdb.rs +0 -0
  42. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/dune.rs +0 -0
  43. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/exasol.rs +0 -0
  44. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/generic.rs +0 -0
  45. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/hive.rs +0 -0
  46. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/materialize.rs +0 -0
  47. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/mysql.rs +0 -0
  48. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/oracle.rs +0 -0
  49. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/postgres.rs +0 -0
  50. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/presto.rs +0 -0
  51. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/redshift.rs +0 -0
  52. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/risingwave.rs +0 -0
  53. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/singlestore.rs +0 -0
  54. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/snowflake.rs +0 -0
  55. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/solr.rs +0 -0
  56. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/spark.rs +0 -0
  57. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/sqlite.rs +0 -0
  58. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/starrocks.rs +0 -0
  59. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/tableau.rs +0 -0
  60. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/teradata.rs +0 -0
  61. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/tidb.rs +0 -0
  62. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/dialects/trino.rs +0 -0
  63. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/diff.rs +0 -0
  64. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/error.rs +0 -0
  65. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/expressions.rs +0 -0
  66. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/function_catalog.rs +0 -0
  67. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/function_registry.rs +0 -0
  68. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/guard.rs +0 -0
  69. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/helper.rs +0 -0
  70. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/lib.rs +0 -0
  71. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/lineage.rs +0 -0
  72. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/openlineage.rs +0 -0
  73. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/annotate_types.rs +0 -0
  74. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/canonicalize.rs +0 -0
  75. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/eliminate_ctes.rs +0 -0
  76. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/eliminate_joins.rs +0 -0
  77. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/isolate_table_selects.rs +0 -0
  78. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/mod.rs +0 -0
  79. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/normalize.rs +0 -0
  80. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/normalize_identifiers.rs +0 -0
  81. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/optimize_joins.rs +0 -0
  82. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/optimizer.rs +0 -0
  83. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/pushdown_predicates.rs +0 -0
  84. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/pushdown_projections.rs +0 -0
  85. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/qualify_columns.rs +0 -0
  86. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/qualify_tables.rs +0 -0
  87. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/simplify.rs +0 -0
  88. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/optimizer/subquery.rs +0 -0
  89. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/parser.rs +0 -0
  90. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/planner.rs +0 -0
  91. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/query_analysis.rs +0 -0
  92. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/resolver.rs +0 -0
  93. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/schema.rs +0 -0
  94. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/scope.rs +0 -0
  95. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/time.rs +0 -0
  96. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/tokens.rs +0 -0
  97. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/traversal.rs +0 -0
  98. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/trie.rs +0 -0
  99. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/validation/tests.rs +0 -0
  100. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/src/validation.rs +0 -0
  101. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/analyze_failures.rs +0 -0
  102. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/clickhouse_regression.rs +0 -0
  103. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/common/mod.rs +0 -0
  104. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/common/test_data.rs +0 -0
  105. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/create_view_security_comment_regression.rs +0 -0
  106. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_clickhouse_coverage.rs +0 -0
  107. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_clickhouse_parser.rs +0 -0
  108. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_dialect.rs +0 -0
  109. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_dialect_tests.rs +0 -0
  110. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/ddl.json +0 -0
  111. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/dml.json +0 -0
  112. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/functions.json +0 -0
  113. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/identity.json +0 -0
  114. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/operators.json +0 -0
  115. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/select.json +0 -0
  116. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/custom_fixtures/datafusion/types.json +0 -0
  117. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/data_type_api.rs +0 -0
  118. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/deep_nesting_regression.rs +0 -0
  119. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/dialect_matrix.rs +0 -0
  120. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/error_handling.rs +0 -0
  121. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/fabric_tpch_regression.rs +0 -0
  122. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/identity_roundtrip.rs +0 -0
  123. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/issue201_regression_test.rs +0 -0
  124. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/issue210_regression_test.rs +0 -0
  125. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/issue226_regression_test.rs +0 -0
  126. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/postgres_sqlite_regression.rs +0 -0
  127. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/query_analysis.rs +0 -0
  128. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/query_analysis_regression.rs +0 -0
  129. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/snowflake_regression_test.rs +0 -0
  130. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_compat.rs +0 -0
  131. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_dialect_identity.rs +0 -0
  132. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_identity.rs +0 -0
  133. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_identity_detailed.rs +0 -0
  134. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_parser.rs +0 -0
  135. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_pretty.rs +0 -0
  136. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_transpilation.rs +0 -0
  137. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/sqlglot_transpile.rs +0 -0
  138. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/tpch_transpile_stack.rs +0 -0
  139. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql/tests/transform_regression.rs +0 -0
  140. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-function-catalogs/Cargo.toml +0 -0
  141. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-function-catalogs/README.md +0 -0
  142. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-function-catalogs/src/clickhouse.rs +0 -0
  143. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-function-catalogs/src/duckdb.rs +0 -0
  144. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-function-catalogs/src/lib.rs +0 -0
  145. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-function-catalogs/tools/clickhouse/extract_functions.py +0 -0
  146. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-function-catalogs/tools/duckdb/extract_functions.py +0 -0
  147. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/Cargo.toml +0 -0
  148. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/README.md +0 -0
  149. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/docs/api.md +0 -0
  150. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/docs/index.md +0 -0
  151. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/mkdocs.yml +0 -0
  152. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/annotate_types.rs +0 -0
  153. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/dialects.rs +0 -0
  154. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/diff.rs +0 -0
  155. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/errors.rs +0 -0
  156. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/expr.rs +0 -0
  157. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/expr_types.rs +0 -0
  158. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/format.rs +0 -0
  159. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/generate.rs +0 -0
  160. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/helpers.rs +0 -0
  161. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/lib.rs +0 -0
  162. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/lineage.rs +0 -0
  163. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/openlineage.rs +0 -0
  164. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/optimize.rs +0 -0
  165. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/parse.rs +0 -0
  166. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/query_analysis.rs +0 -0
  167. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/tokenize.rs +0 -0
  168. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/transforms.rs +0 -0
  169. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/transpile.rs +0 -0
  170. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/types.rs +0 -0
  171. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/src/validate.rs +0 -0
  172. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/conftest.py +0 -0
  173. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_compat.py +0 -0
  174. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_dialects.py +0 -0
  175. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_diff.py +0 -0
  176. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_expression.py +0 -0
  177. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_format.py +0 -0
  178. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_generate.py +0 -0
  179. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_lineage.py +0 -0
  180. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_optimize.py +0 -0
  181. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_parse.py +0 -0
  182. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_query_analysis.py +0 -0
  183. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_transforms.py +0 -0
  184. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_transpile.py +0 -0
  185. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/tests/test_validate.py +0 -0
  186. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/crates/polyglot-sql-python/uv.lock +0 -0
  187. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/pyproject.toml +0 -0
  188. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/python/polyglot_sql/__init__.py +0 -0
  189. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/python/polyglot_sql/__init__.pyi +0 -0
  190. {polyglot_sql-0.5.13 → polyglot_sql-0.5.15}/python/polyglot_sql/py.typed +0 -0
@@ -605,7 +605,7 @@ dependencies = [
605
605
 
606
606
  [[package]]
607
607
  name = "polyglot-sql"
608
- version = "0.5.13"
608
+ version = "0.5.15"
609
609
  dependencies = [
610
610
  "criterion",
611
611
  "once_cell",
@@ -621,7 +621,7 @@ dependencies = [
621
621
 
622
622
  [[package]]
623
623
  name = "polyglot-sql-ffi"
624
- version = "0.5.13"
624
+ version = "0.5.15"
625
625
  dependencies = [
626
626
  "cbindgen",
627
627
  "polyglot-sql",
@@ -631,11 +631,11 @@ dependencies = [
631
631
 
632
632
  [[package]]
633
633
  name = "polyglot-sql-function-catalogs"
634
- version = "0.5.13"
634
+ version = "0.5.15"
635
635
 
636
636
  [[package]]
637
637
  name = "polyglot-sql-python"
638
- version = "0.5.13"
638
+ version = "0.5.15"
639
639
  dependencies = [
640
640
  "polyglot-sql",
641
641
  "pyo3",
@@ -646,7 +646,7 @@ dependencies = [
646
646
 
647
647
  [[package]]
648
648
  name = "polyglot-sql-wasm"
649
- version = "0.5.13"
649
+ version = "0.5.15"
650
650
  dependencies = [
651
651
  "console_error_panic_hook",
652
652
  "js-sys",
@@ -6,7 +6,7 @@ exclude = [
6
6
  ]
7
7
 
8
8
  [workspace.package]
9
- version = "0.5.13"
9
+ version = "0.5.15"
10
10
  edition = "2021"
11
11
  license = "MIT"
12
12
  authors = ["polyglot contributors"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: polyglot-sql
3
- Version: 0.5.13
3
+ Version: 0.5.15
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -106,7 +106,7 @@ thiserror = { workspace = true }
106
106
  unicode-segmentation = { workspace = true }
107
107
  stacker = { version = "0.1", optional = true }
108
108
  ts-rs = { version = "12.0", features = ["serde-compat"], optional = true }
109
- polyglot-sql-function-catalogs = { path = "../polyglot-sql-function-catalogs", version = "0.5.13", optional = true, default-features = false }
109
+ polyglot-sql-function-catalogs = { path = "../polyglot-sql-function-catalogs", version = "0.5.15", optional = true, default-features = false }
110
110
 
111
111
  [dev-dependencies]
112
112
  pretty_assertions = "1.4"
@@ -48,6 +48,8 @@ impl DialectImpl for FabricDialect {
48
48
  null_ordering_supported: false,
49
49
  aggregate_filter_supported: false,
50
50
  cte_recursive_keyword_required: false,
51
+ ensure_bools: true,
52
+ except_intersect_support_all_clause: false,
51
53
  ..Default::default()
52
54
  }
53
55
  }
@@ -4185,6 +4185,7 @@ impl Dialect {
4185
4185
  feature = "dialect-starrocks",
4186
4186
  feature = "dialect-oracle",
4187
4187
  feature = "dialect-clickhouse",
4188
+ feature = "dialect-fabric",
4188
4189
  ))]
4189
4190
  use crate::transforms;
4190
4191
 
@@ -4258,6 +4259,16 @@ impl Dialect {
4258
4259
  let expr = transforms::qualify_derived_table_outputs(expr)?;
4259
4260
  Ok(expr)
4260
4261
  }
4262
+ // Fabric shares T-SQL predicate rules: BIT values cannot be used as
4263
+ // bare conditions in WHERE/HAVING/ON/CASE WHEN contexts. Keep this
4264
+ // branch scoped to boolean coercion so Fabric-specific APPLY and
4265
+ // derived-table output behavior does not inherit unrelated T-SQL
4266
+ // preprocessing.
4267
+ #[cfg(feature = "dialect-fabric")]
4268
+ DialectType::Fabric => {
4269
+ let expr = transforms::ensure_bools(expr)?;
4270
+ Ok(expr)
4271
+ }
4261
4272
  // Spark doesn't support QUALIFY (but Databricks does)
4262
4273
  // Spark doesn't support CTEs in subqueries (hoist to top level)
4263
4274
  #[cfg(feature = "dialect-spark")]
@@ -5003,6 +5014,15 @@ impl Dialect {
5003
5014
  if Self::node_is_function_named(node, "TO_TSVECTOR") {
5004
5015
  Self::push_unsupported_diagnostic(&mut diagnostics, "PostgreSQL TO_TSVECTOR");
5005
5016
  }
5017
+ if matches!(target, DialectType::TSQL | DialectType::Fabric) {
5018
+ if let Some(function_name) = Self::postgres_tsql_unsupported_function_name(node)
5019
+ {
5020
+ Self::push_unsupported_diagnostic(
5021
+ &mut diagnostics,
5022
+ &format!("PostgreSQL {function_name}"),
5023
+ );
5024
+ }
5025
+ }
5006
5026
  if matches!(target, DialectType::TSQL | DialectType::Fabric)
5007
5027
  && Self::node_is_postgres_type_function_cast(node)
5008
5028
  {
@@ -5183,6 +5203,46 @@ impl Dialect {
5183
5203
  }
5184
5204
  }
5185
5205
 
5206
+ fn postgres_tsql_unsupported_function_name(expr: &Expression) -> Option<&'static str> {
5207
+ match expr {
5208
+ Expression::Lpad(_) => Some("LPAD"),
5209
+ Expression::Rpad(_) => Some("RPAD"),
5210
+ Expression::SplitPart(_) => Some("SPLIT_PART"),
5211
+ Expression::Initcap(_) => Some("INITCAP"),
5212
+ Expression::ToJson(_) => Some("TO_JSON"),
5213
+ Expression::JSONBObjectAgg(_) => Some("JSONB_OBJECT_AGG"),
5214
+ Expression::Function(function) => {
5215
+ Self::postgres_tsql_unsupported_function_name_str(&function.name)
5216
+ }
5217
+ Expression::AggregateFunction(function) => {
5218
+ Self::postgres_tsql_unsupported_function_name_str(&function.name)
5219
+ }
5220
+ _ => None,
5221
+ }
5222
+ }
5223
+
5224
+ fn postgres_tsql_unsupported_function_name_str(name: &str) -> Option<&'static str> {
5225
+ if name.eq_ignore_ascii_case("LPAD") {
5226
+ Some("LPAD")
5227
+ } else if name.eq_ignore_ascii_case("RPAD") {
5228
+ Some("RPAD")
5229
+ } else if name.eq_ignore_ascii_case("SPLIT_PART") {
5230
+ Some("SPLIT_PART")
5231
+ } else if name.eq_ignore_ascii_case("INITCAP") {
5232
+ Some("INITCAP")
5233
+ } else if name.eq_ignore_ascii_case("TO_JSON") {
5234
+ Some("TO_JSON")
5235
+ } else if name.eq_ignore_ascii_case("TO_JSONB") {
5236
+ Some("TO_JSONB")
5237
+ } else if name.eq_ignore_ascii_case("JSONB_AGG") {
5238
+ Some("JSONB_AGG")
5239
+ } else if name.eq_ignore_ascii_case("JSONB_OBJECT_AGG") {
5240
+ Some("JSONB_OBJECT_AGG")
5241
+ } else {
5242
+ None
5243
+ }
5244
+ }
5245
+
5186
5246
  fn normalize_postgres_type_function_casts(expr: Expression) -> Result<Expression> {
5187
5247
  transform_recursive(expr, &|e| match e {
5188
5248
  Expression::Function(function) => {
@@ -5689,21 +5749,22 @@ impl Dialect {
5689
5749
  }
5690
5750
 
5691
5751
  fn tsql_boolean_value_case(predicate: Expression) -> Expression {
5692
- Expression::Case(Box::new(crate::expressions::Case {
5752
+ let case = Expression::Case(Box::new(crate::expressions::Case {
5693
5753
  operand: None,
5694
- whens: vec![
5695
- (predicate.clone(), Expression::number(1)),
5696
- (
5697
- Expression::Not(Box::new(crate::expressions::UnaryOp {
5698
- this: predicate,
5699
- inferred_type: None,
5700
- })),
5701
- Expression::number(0),
5702
- ),
5703
- ],
5704
- else_: None,
5754
+ whens: vec![(predicate, Expression::number(1))],
5755
+ else_: Some(Expression::number(0)),
5705
5756
  comments: Vec::new(),
5706
5757
  inferred_type: None,
5758
+ }));
5759
+
5760
+ Expression::Cast(Box::new(Cast {
5761
+ this: case,
5762
+ to: DataType::Boolean,
5763
+ trailing_comments: Vec::new(),
5764
+ double_colon_syntax: false,
5765
+ format: None,
5766
+ default: None,
5767
+ inferred_type: None,
5707
5768
  }))
5708
5769
  }
5709
5770
 
@@ -194,66 +194,11 @@ impl DialectImpl for TSQLDialect {
194
194
  // ===== Data Type Mappings =====
195
195
  Expression::DataType(dt) => self.transform_data_type(dt),
196
196
 
197
- // ===== Boolean IS TRUE/FALSE -> = 1/0 for TSQL =====
198
- // TSQL doesn't have IS TRUE/IS FALSE syntax
199
- Expression::IsTrue(it) => {
200
- let one = Expression::Literal(Box::new(crate::expressions::Literal::Number(
201
- "1".to_string(),
202
- )));
203
- if it.not {
204
- // a IS NOT TRUE -> NOT a = 1
205
- Ok(Expression::Not(Box::new(crate::expressions::UnaryOp {
206
- this: Expression::Eq(Box::new(crate::expressions::BinaryOp {
207
- left: it.this,
208
- right: one,
209
- left_comments: vec![],
210
- operator_comments: vec![],
211
- trailing_comments: vec![],
212
- inferred_type: None,
213
- })),
214
- inferred_type: None,
215
- })))
216
- } else {
217
- // a IS TRUE -> a = 1
218
- Ok(Expression::Eq(Box::new(crate::expressions::BinaryOp {
219
- left: it.this,
220
- right: one,
221
- left_comments: vec![],
222
- operator_comments: vec![],
223
- trailing_comments: vec![],
224
- inferred_type: None,
225
- })))
226
- }
227
- }
228
- Expression::IsFalse(it) => {
229
- let zero = Expression::Literal(Box::new(crate::expressions::Literal::Number(
230
- "0".to_string(),
231
- )));
232
- if it.not {
233
- // a IS NOT FALSE -> NOT a = 0
234
- Ok(Expression::Not(Box::new(crate::expressions::UnaryOp {
235
- this: Expression::Eq(Box::new(crate::expressions::BinaryOp {
236
- left: it.this,
237
- right: zero,
238
- left_comments: vec![],
239
- operator_comments: vec![],
240
- trailing_comments: vec![],
241
- inferred_type: None,
242
- })),
243
- inferred_type: None,
244
- })))
245
- } else {
246
- // a IS FALSE -> a = 0
247
- Ok(Expression::Eq(Box::new(crate::expressions::BinaryOp {
248
- left: it.this,
249
- right: zero,
250
- left_comments: vec![],
251
- operator_comments: vec![],
252
- trailing_comments: vec![],
253
- inferred_type: None,
254
- })))
255
- }
256
- }
197
+ // ===== Boolean IS TRUE/FALSE -> T-SQL 3VL truth table =====
198
+ // T-SQL doesn't have IS TRUE/IS FALSE syntax. Negated forms must
199
+ // explicitly preserve UNKNOWN/NULL rows instead of using NOT (x = n).
200
+ Expression::IsTrue(it) => Ok(Self::boolean_test_predicate(it.this, true, it.not)),
201
+ Expression::IsFalse(it) => Ok(Self::boolean_test_predicate(it.this, false, it.not)),
257
202
 
258
203
  // Note: CASE WHEN boolean conditions are handled in ensure_bools preprocessing
259
204
 
@@ -684,6 +629,138 @@ impl DialectImpl for TSQLDialect {
684
629
 
685
630
  #[cfg(feature = "transpile")]
686
631
  impl TSQLDialect {
632
+ fn binary(
633
+ left: Expression,
634
+ right: Expression,
635
+ op: fn(Box<BinaryOp>) -> Expression,
636
+ ) -> Expression {
637
+ op(Box::new(BinaryOp {
638
+ left,
639
+ right,
640
+ left_comments: Vec::new(),
641
+ operator_comments: Vec::new(),
642
+ trailing_comments: Vec::new(),
643
+ inferred_type: None,
644
+ }))
645
+ }
646
+
647
+ fn eq(left: Expression, right: Expression) -> Expression {
648
+ Self::binary(left, right, Expression::Eq)
649
+ }
650
+
651
+ fn or(left: Expression, right: Expression) -> Expression {
652
+ Self::binary(left, right, Expression::Or)
653
+ }
654
+
655
+ fn not(this: Expression) -> Expression {
656
+ Expression::Not(Box::new(crate::expressions::UnaryOp {
657
+ this,
658
+ inferred_type: None,
659
+ }))
660
+ }
661
+
662
+ fn is_null(this: Expression) -> Expression {
663
+ Expression::IsNull(Box::new(crate::expressions::IsNull {
664
+ this,
665
+ not: false,
666
+ postfix_form: false,
667
+ }))
668
+ }
669
+
670
+ fn boolean_test_case_for_predicate(
671
+ predicate: Expression,
672
+ test_true: bool,
673
+ negated: bool,
674
+ ) -> Expression {
675
+ let condition = match (test_true, negated) {
676
+ (true, false) => predicate,
677
+ (false, false) => Self::not(predicate),
678
+ (true, true) => {
679
+ return Expression::Case(Box::new(crate::expressions::Case {
680
+ operand: None,
681
+ whens: vec![(predicate, Expression::number(0))],
682
+ else_: Some(Expression::number(1)),
683
+ comments: Vec::new(),
684
+ inferred_type: None,
685
+ }))
686
+ }
687
+ (false, true) => {
688
+ return Expression::Case(Box::new(crate::expressions::Case {
689
+ operand: None,
690
+ whens: vec![(Self::not(predicate), Expression::number(0))],
691
+ else_: Some(Expression::number(1)),
692
+ comments: Vec::new(),
693
+ inferred_type: None,
694
+ }))
695
+ }
696
+ };
697
+
698
+ Expression::Case(Box::new(crate::expressions::Case {
699
+ operand: None,
700
+ whens: vec![(condition, Expression::number(1))],
701
+ else_: Some(Expression::number(0)),
702
+ comments: Vec::new(),
703
+ inferred_type: None,
704
+ }))
705
+ }
706
+
707
+ fn boolean_test_predicate(operand: Expression, test_true: bool, negated: bool) -> Expression {
708
+ if Self::is_boolean_predicate_operand(&operand) {
709
+ return match (test_true, negated) {
710
+ (true, false) => operand,
711
+ (false, false) => Self::not(operand),
712
+ _ => Self::eq(
713
+ Self::boolean_test_case_for_predicate(operand, test_true, negated),
714
+ Expression::number(1),
715
+ ),
716
+ };
717
+ }
718
+
719
+ match (test_true, negated) {
720
+ (true, false) => Self::eq(operand, Expression::number(1)),
721
+ (false, false) => Self::eq(operand, Expression::number(0)),
722
+ (true, true) => Self::or(
723
+ Self::eq(operand.clone(), Expression::number(0)),
724
+ Self::is_null(operand),
725
+ ),
726
+ (false, true) => Self::or(
727
+ Self::eq(operand.clone(), Expression::number(1)),
728
+ Self::is_null(operand),
729
+ ),
730
+ }
731
+ }
732
+
733
+ fn is_boolean_predicate_operand(expr: &Expression) -> bool {
734
+ match expr {
735
+ Expression::Paren(paren) => Self::is_boolean_predicate_operand(&paren.this),
736
+ Expression::Eq(_)
737
+ | Expression::Neq(_)
738
+ | Expression::Lt(_)
739
+ | Expression::Lte(_)
740
+ | Expression::Gt(_)
741
+ | Expression::Gte(_)
742
+ | Expression::Is(_)
743
+ | Expression::IsNull(_)
744
+ | Expression::IsTrue(_)
745
+ | Expression::IsFalse(_)
746
+ | Expression::Like(_)
747
+ | Expression::ILike(_)
748
+ | Expression::SimilarTo(_)
749
+ | Expression::Glob(_)
750
+ | Expression::RegexpLike(_)
751
+ | Expression::In(_)
752
+ | Expression::Between(_)
753
+ | Expression::Exists(_)
754
+ | Expression::And(_)
755
+ | Expression::Or(_)
756
+ | Expression::Not(_)
757
+ | Expression::Any(_)
758
+ | Expression::All(_)
759
+ | Expression::EqualNull(_) => true,
760
+ _ => false,
761
+ }
762
+ }
763
+
687
764
  fn scalar_array_comparison_values(expr: &Expression) -> Option<Vec<Expression>> {
688
765
  let (mut values, element_type) = Self::scalar_array_comparison_values_inner(expr)?;
689
766
  if let Some(to) = element_type {