polyglot-sql 0.5.5__tar.gz → 0.5.6__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 (184) hide show
  1. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/Cargo.lock +5 -5
  2. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/Cargo.toml +1 -1
  3. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/PKG-INFO +1 -1
  4. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/Cargo.toml +1 -1
  5. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/lineage.rs +195 -1
  6. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/tests/test_lineage.py +15 -6
  7. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/README.md +0 -0
  8. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/README.md +0 -0
  9. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/benches/in_list.rs +0 -0
  10. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/benches/parsing.rs +0 -0
  11. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/benches/rust_parsing.rs +0 -0
  12. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/benches/transpile.rs +0 -0
  13. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/examples/basic_usage.rs +0 -0
  14. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/examples/bench_json.rs +0 -0
  15. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/ast_json.rs +0 -0
  16. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/ast_transforms.rs +0 -0
  17. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/builder.rs +0 -0
  18. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/athena.rs +0 -0
  19. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/bigquery.rs +0 -0
  20. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/clickhouse.rs +0 -0
  21. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/cockroachdb.rs +0 -0
  22. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/databricks.rs +0 -0
  23. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/datafusion.rs +0 -0
  24. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/doris.rs +0 -0
  25. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/dremio.rs +0 -0
  26. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/drill.rs +0 -0
  27. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/druid.rs +0 -0
  28. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/duckdb.rs +0 -0
  29. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/dune.rs +0 -0
  30. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/exasol.rs +0 -0
  31. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/fabric.rs +0 -0
  32. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/generic.rs +0 -0
  33. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/hive.rs +0 -0
  34. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/materialize.rs +0 -0
  35. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/mod.rs +0 -0
  36. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/mysql.rs +0 -0
  37. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/oracle.rs +0 -0
  38. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/postgres.rs +0 -0
  39. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/presto.rs +0 -0
  40. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/redshift.rs +0 -0
  41. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/risingwave.rs +0 -0
  42. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/singlestore.rs +0 -0
  43. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/snowflake.rs +0 -0
  44. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/solr.rs +0 -0
  45. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/spark.rs +0 -0
  46. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/sqlite.rs +0 -0
  47. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/starrocks.rs +0 -0
  48. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/tableau.rs +0 -0
  49. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/teradata.rs +0 -0
  50. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/tidb.rs +0 -0
  51. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/trino.rs +0 -0
  52. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/dialects/tsql.rs +0 -0
  53. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/diff.rs +0 -0
  54. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/error.rs +0 -0
  55. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/expressions.rs +0 -0
  56. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/function_catalog.rs +0 -0
  57. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/function_registry.rs +0 -0
  58. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/generator.rs +0 -0
  59. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/helper.rs +0 -0
  60. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/lib.rs +0 -0
  61. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/openlineage.rs +0 -0
  62. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/annotate_types.rs +0 -0
  63. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/canonicalize.rs +0 -0
  64. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/eliminate_ctes.rs +0 -0
  65. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/eliminate_joins.rs +0 -0
  66. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/isolate_table_selects.rs +0 -0
  67. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/mod.rs +0 -0
  68. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/normalize.rs +0 -0
  69. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/normalize_identifiers.rs +0 -0
  70. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/optimize_joins.rs +0 -0
  71. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/optimizer.rs +0 -0
  72. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/pushdown_predicates.rs +0 -0
  73. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/pushdown_projections.rs +0 -0
  74. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/qualify_columns.rs +0 -0
  75. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/qualify_tables.rs +0 -0
  76. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/simplify.rs +0 -0
  77. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/optimizer/subquery.rs +0 -0
  78. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/parser.rs +0 -0
  79. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/planner.rs +0 -0
  80. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/query_analysis.rs +0 -0
  81. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/resolver.rs +0 -0
  82. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/schema.rs +0 -0
  83. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/scope.rs +0 -0
  84. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/time.rs +0 -0
  85. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/tokens.rs +0 -0
  86. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/transforms.rs +0 -0
  87. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/traversal.rs +0 -0
  88. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/trie.rs +0 -0
  89. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/validation/tests.rs +0 -0
  90. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/src/validation.rs +0 -0
  91. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/analyze_failures.rs +0 -0
  92. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/clickhouse_regression.rs +0 -0
  93. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/common/known_failures.rs +0 -0
  94. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/common/mod.rs +0 -0
  95. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/common/test_data.rs +0 -0
  96. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/common/test_runner.rs +0 -0
  97. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/custom_clickhouse_coverage.rs +0 -0
  98. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/custom_clickhouse_parser.rs +0 -0
  99. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/custom_dialect.rs +0 -0
  100. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/custom_dialect_tests.rs +0 -0
  101. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/custom_fixtures/datafusion/ddl.json +0 -0
  102. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/custom_fixtures/datafusion/dml.json +0 -0
  103. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/custom_fixtures/datafusion/functions.json +0 -0
  104. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/custom_fixtures/datafusion/identity.json +0 -0
  105. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/custom_fixtures/datafusion/operators.json +0 -0
  106. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/custom_fixtures/datafusion/select.json +0 -0
  107. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/custom_fixtures/datafusion/transpilation.json +0 -0
  108. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/custom_fixtures/datafusion/types.json +0 -0
  109. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/data_type_api.rs +0 -0
  110. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/deep_nesting_regression.rs +0 -0
  111. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/dialect_matrix.rs +0 -0
  112. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/error_handling.rs +0 -0
  113. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/fabric_regression.rs +0 -0
  114. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/fabric_tpch_regression.rs +0 -0
  115. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/identity_roundtrip.rs +0 -0
  116. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/issue201_regression_test.rs +0 -0
  117. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/issue210_regression_test.rs +0 -0
  118. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/issue226_regression_test.rs +0 -0
  119. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/issue227_strict_unsupported.rs +0 -0
  120. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/postgres_sqlite_regression.rs +0 -0
  121. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/query_analysis.rs +0 -0
  122. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/query_analysis_regression.rs +0 -0
  123. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/snowflake_regression_test.rs +0 -0
  124. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/sqlglot_compat.rs +0 -0
  125. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/sqlglot_dialect_identity.rs +0 -0
  126. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/sqlglot_identity.rs +0 -0
  127. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/sqlglot_identity_detailed.rs +0 -0
  128. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/sqlglot_parser.rs +0 -0
  129. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/sqlglot_pretty.rs +0 -0
  130. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/sqlglot_transpilation.rs +0 -0
  131. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/sqlglot_transpile.rs +0 -0
  132. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/tpch_transpile_stack.rs +0 -0
  133. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/transform_regression.rs +0 -0
  134. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql/tests/tsql_regression.rs +0 -0
  135. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-function-catalogs/Cargo.toml +0 -0
  136. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-function-catalogs/README.md +0 -0
  137. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-function-catalogs/src/clickhouse.rs +0 -0
  138. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-function-catalogs/src/duckdb.rs +0 -0
  139. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-function-catalogs/src/lib.rs +0 -0
  140. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-function-catalogs/tools/clickhouse/extract_functions.py +0 -0
  141. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-function-catalogs/tools/duckdb/extract_functions.py +0 -0
  142. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/Cargo.toml +0 -0
  143. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/README.md +0 -0
  144. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/docs/api.md +0 -0
  145. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/docs/index.md +0 -0
  146. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/mkdocs.yml +0 -0
  147. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/annotate_types.rs +0 -0
  148. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/dialects.rs +0 -0
  149. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/diff.rs +0 -0
  150. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/errors.rs +0 -0
  151. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/expr.rs +0 -0
  152. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/expr_types.rs +0 -0
  153. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/format.rs +0 -0
  154. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/generate.rs +0 -0
  155. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/helpers.rs +0 -0
  156. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/lib.rs +0 -0
  157. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/lineage.rs +0 -0
  158. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/openlineage.rs +0 -0
  159. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/optimize.rs +0 -0
  160. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/parse.rs +0 -0
  161. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/query_analysis.rs +0 -0
  162. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/tokenize.rs +0 -0
  163. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/transforms.rs +0 -0
  164. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/transpile.rs +0 -0
  165. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/types.rs +0 -0
  166. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/src/validate.rs +0 -0
  167. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/tests/conftest.py +0 -0
  168. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/tests/test_compat.py +0 -0
  169. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/tests/test_dialects.py +0 -0
  170. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/tests/test_diff.py +0 -0
  171. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/tests/test_expression.py +0 -0
  172. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/tests/test_format.py +0 -0
  173. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/tests/test_generate.py +0 -0
  174. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/tests/test_optimize.py +0 -0
  175. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/tests/test_parse.py +0 -0
  176. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/tests/test_query_analysis.py +0 -0
  177. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/tests/test_transforms.py +0 -0
  178. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/tests/test_transpile.py +0 -0
  179. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/tests/test_validate.py +0 -0
  180. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/crates/polyglot-sql-python/uv.lock +0 -0
  181. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/pyproject.toml +0 -0
  182. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/python/polyglot_sql/__init__.py +0 -0
  183. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/python/polyglot_sql/__init__.pyi +0 -0
  184. {polyglot_sql-0.5.5 → polyglot_sql-0.5.6}/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.5"
608
+ version = "0.5.6"
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.5"
624
+ version = "0.5.6"
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.5"
634
+ version = "0.5.6"
635
635
 
636
636
  [[package]]
637
637
  name = "polyglot-sql-python"
638
- version = "0.5.5"
638
+ version = "0.5.6"
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.5"
649
+ version = "0.5.6"
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.5"
9
+ version = "0.5.6"
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.5
3
+ Version: 0.5.6
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.5", optional = true, default-features = false }
109
+ polyglot-sql-function-catalogs = { path = "../polyglot-sql-function-catalogs", version = "0.5.6", optional = true, default-features = false }
110
110
 
111
111
  [dev-dependencies]
112
112
  pretty_assertions = "1.4"
@@ -541,6 +541,13 @@ fn get_expression_output_name(expr: &Expression) -> Option<String> {
541
541
  /// Source info extracted from a SELECT's FROM/JOIN clauses in a single pass.
542
542
  struct SourceInfo {
543
543
  alias: String,
544
+ /// Whether this source was introduced through a quoted identifier.
545
+ ///
546
+ /// The schema-less star passthrough heuristic must stay conservative for
547
+ /// quoted sources because unresolved quoted table names can be distinct
548
+ /// from similarly named CTEs that older scope paths still compare
549
+ /// case-insensitively.
550
+ quoted: bool,
544
551
  /// Normalized name for CTE lookup: unquoted → lowercased, quoted → as-is.
545
552
  normalized: String,
546
553
  /// Fully-qualified table name for schema lookup (e.g., "db.schema.table").
@@ -556,6 +563,7 @@ fn get_select_sources(select: &Select) -> Vec<SourceInfo> {
556
563
  fn virtual_source_info(alias: &Identifier) -> SourceInfo {
557
564
  SourceInfo {
558
565
  alias: alias.name.clone(),
566
+ quoted: alias.quoted,
559
567
  normalized: normalize_cte_name(alias),
560
568
  fq_name: alias.name.clone(),
561
569
  }
@@ -564,6 +572,7 @@ fn get_select_sources(select: &Select) -> Vec<SourceInfo> {
564
572
  fn named_virtual_source_info(alias: &str) -> SourceInfo {
565
573
  SourceInfo {
566
574
  alias: alias.to_string(),
575
+ quoted: false,
567
576
  normalized: alias.to_lowercase(),
568
577
  fq_name: alias.to_string(),
569
578
  }
@@ -588,16 +597,19 @@ fn get_select_sources(select: &Select) -> Vec<SourceInfo> {
588
597
  let fq_name = parts.join(".");
589
598
  Some(SourceInfo {
590
599
  alias,
600
+ quoted: t.name.quoted,
591
601
  normalized,
592
602
  fq_name,
593
603
  })
594
604
  }
595
605
  Expression::Subquery(s) => {
596
- let alias = s.alias.as_ref()?.name.clone();
606
+ let alias_identifier = s.alias.as_ref()?;
607
+ let alias = alias_identifier.name.clone();
597
608
  let normalized = alias.to_lowercase();
598
609
  let fq_name = alias.clone();
599
610
  Some(SourceInfo {
600
611
  alias,
612
+ quoted: alias_identifier.quoted,
601
613
  normalized,
602
614
  fq_name,
603
615
  })
@@ -1388,6 +1400,9 @@ fn find_select_expr(
1388
1400
  }
1389
1401
  }
1390
1402
  }
1403
+ if let Some(expr) = synthesize_star_passthrough_expr(select, name) {
1404
+ return Ok(expr);
1405
+ }
1391
1406
  Err(crate::error::Error::parse(
1392
1407
  format!("Cannot find column '{}' in query", name),
1393
1408
  0,
@@ -1411,6 +1426,103 @@ fn find_select_expr(
1411
1426
  }
1412
1427
  }
1413
1428
 
1429
+ fn synthesize_star_passthrough_expr(select: &Select, name: &str) -> Option<Expression> {
1430
+ let sources = get_select_sources(select);
1431
+ if sources.is_empty() {
1432
+ return None;
1433
+ }
1434
+
1435
+ let mut candidate_aliases = Vec::new();
1436
+ let mut seen = HashSet::new();
1437
+
1438
+ for expr in &select.expressions {
1439
+ let aliases = match star_passthrough_source_aliases(expr, &sources) {
1440
+ StarPassthroughSources::None => continue,
1441
+ StarPassthroughSources::Ambiguous => return None,
1442
+ StarPassthroughSources::Aliases(aliases) => aliases,
1443
+ };
1444
+
1445
+ for alias in aliases {
1446
+ if seen.insert(alias.clone()) {
1447
+ candidate_aliases.push(alias);
1448
+ }
1449
+ }
1450
+ }
1451
+
1452
+ match candidate_aliases.as_slice() {
1453
+ [alias] => {
1454
+ let table = Identifier::new(alias.clone());
1455
+ Some(make_column_expr(name, Some(&table)))
1456
+ }
1457
+ _ => None,
1458
+ }
1459
+ }
1460
+
1461
+ enum StarPassthroughSources {
1462
+ None,
1463
+ Ambiguous,
1464
+ Aliases(Vec<String>),
1465
+ }
1466
+
1467
+ fn star_passthrough_source_aliases(
1468
+ expr: &Expression,
1469
+ sources: &[SourceInfo],
1470
+ ) -> StarPassthroughSources {
1471
+ match expr {
1472
+ Expression::Star(star) => star_source_aliases(star.table.as_ref(), sources),
1473
+ Expression::Column(column) if column.name.name == "*" => {
1474
+ star_source_aliases(column.table.as_ref(), sources)
1475
+ }
1476
+ Expression::Annotated(annotated) => {
1477
+ star_passthrough_source_aliases(&annotated.this, sources)
1478
+ }
1479
+ _ => StarPassthroughSources::None,
1480
+ }
1481
+ }
1482
+
1483
+ fn star_source_aliases(
1484
+ qualifier: Option<&Identifier>,
1485
+ sources: &[SourceInfo],
1486
+ ) -> StarPassthroughSources {
1487
+ if let Some(qualifier) = qualifier {
1488
+ let mut aliases = Vec::new();
1489
+
1490
+ for source in sources {
1491
+ if source_matches_star_qualifier(source, qualifier) {
1492
+ aliases.push(source.alias.clone());
1493
+ }
1494
+ }
1495
+
1496
+ return match aliases.len() {
1497
+ 0 => StarPassthroughSources::None,
1498
+ 1 => StarPassthroughSources::Aliases(aliases),
1499
+ _ => StarPassthroughSources::Ambiguous,
1500
+ };
1501
+ }
1502
+
1503
+ match sources {
1504
+ // Do not synthesize a source column for unresolved quoted table stars.
1505
+ // This keeps quoted CTE/table case semantics intact while still allowing
1506
+ // the schema-less fallback for common unquoted SELECT * passthroughs.
1507
+ [source] if source.quoted => StarPassthroughSources::None,
1508
+ [source] => StarPassthroughSources::Aliases(vec![source.alias.clone()]),
1509
+ [] => StarPassthroughSources::None,
1510
+ _ => StarPassthroughSources::Ambiguous,
1511
+ }
1512
+ }
1513
+
1514
+ fn source_matches_star_qualifier(source: &SourceInfo, qualifier: &Identifier) -> bool {
1515
+ if source.normalized == normalize_cte_name(qualifier) {
1516
+ return true;
1517
+ }
1518
+
1519
+ if qualifier.quoted {
1520
+ source.alias == qualifier.name
1521
+ } else {
1522
+ source.alias.eq_ignore_ascii_case(&qualifier.name)
1523
+ }
1524
+ }
1525
+
1414
1526
  /// Find the positional index of a column name in a set operation's first SELECT branch.
1415
1527
  fn column_to_index(
1416
1528
  set_op_expr: &Expression,
@@ -3822,6 +3934,88 @@ SELECT json_data FROM transform_cte
3822
3934
  );
3823
3935
  }
3824
3936
 
3937
+ #[test]
3938
+ fn test_lineage_schema_less_cte_star_passthrough_resolves_base_column() {
3939
+ let expr = parse("WITH c AS (SELECT * FROM t) SELECT c.x FROM c");
3940
+ let node = lineage("x", &expr, None, false).unwrap();
3941
+
3942
+ let all_names: Vec<_> = node.walk().map(|n| n.name.clone()).collect();
3943
+ assert!(
3944
+ all_names.iter().any(|name| name == "t.x"),
3945
+ "Expected schema-less CTE star passthrough to reach t.x, got: {:?}",
3946
+ all_names
3947
+ );
3948
+
3949
+ let cte_node = node
3950
+ .walk()
3951
+ .find(|child| child.source_kind == SourceKind::Cte && child.source_name == "c")
3952
+ .expect("expected CTE hop with source_name c");
3953
+ assert_eq!(cte_node.source_kind, SourceKind::Cte);
3954
+ assert_eq!(cte_node.source_name, "c");
3955
+ }
3956
+
3957
+ #[test]
3958
+ fn test_lineage_schema_less_cte_star_passthrough_with_aggregation() {
3959
+ let expr = parse(
3960
+ "WITH c AS (SELECT * FROM t) \
3961
+ SELECT SUM(c.x) AS s FROM c GROUP BY 1",
3962
+ );
3963
+ let node = lineage("s", &expr, None, false).unwrap();
3964
+
3965
+ let all_names: Vec<_> = node.walk().map(|n| n.name.clone()).collect();
3966
+ assert!(
3967
+ all_names.iter().any(|name| name == "t.x"),
3968
+ "Expected aggregate over CTE star passthrough to reach t.x, got: {:?}",
3969
+ all_names
3970
+ );
3971
+ }
3972
+
3973
+ #[test]
3974
+ fn test_lineage_schema_less_cte_star_passthrough_with_join_and_alias() {
3975
+ let expr = parse(
3976
+ "WITH a AS (SELECT * FROM t1), b AS (SELECT * FROM t2) \
3977
+ SELECT SUM(b.x) AS s FROM a LEFT JOIN b ON b.id = a.id GROUP BY a.k",
3978
+ );
3979
+ let node = lineage("s", &expr, None, false).unwrap();
3980
+
3981
+ let all_names: Vec<_> = node.walk().map(|n| n.name.clone()).collect();
3982
+ assert!(
3983
+ all_names.iter().any(|name| name == "t2.x"),
3984
+ "Expected joined CTE star passthrough to reach t2.x, got: {:?}",
3985
+ all_names
3986
+ );
3987
+ }
3988
+
3989
+ #[test]
3990
+ fn test_lineage_schema_less_chained_cte_star_passthrough() {
3991
+ let expr = parse(
3992
+ "WITH c1 AS (SELECT * FROM t), \
3993
+ c2 AS (SELECT * FROM c1), \
3994
+ c3 AS (SELECT * FROM c2) \
3995
+ SELECT c3.x FROM c3",
3996
+ );
3997
+ let node = lineage("x", &expr, None, false).unwrap();
3998
+
3999
+ let all_names: Vec<_> = node.walk().map(|n| n.name.clone()).collect();
4000
+ assert!(
4001
+ all_names.iter().any(|name| name == "t.x"),
4002
+ "Expected chained CTE star passthrough to reach t.x, got: {:?}",
4003
+ all_names
4004
+ );
4005
+ }
4006
+
4007
+ #[test]
4008
+ fn test_lineage_schema_less_unqualified_star_with_multiple_sources_does_not_guess() {
4009
+ let expr = parse("SELECT * FROM t1 JOIN t2 ON t1.id = t2.id");
4010
+ let result = lineage("x", &expr, None, false);
4011
+
4012
+ assert!(
4013
+ result.is_err(),
4014
+ "Unqualified star over multiple sources should remain ambiguous, got: {:?}",
4015
+ result
4016
+ );
4017
+ }
4018
+
3825
4019
  #[test]
3826
4020
  fn test_lineage_cte_select_star_renamed_column() {
3827
4021
  // dbt standard pattern: CTE with column rename + outer SELECT *
@@ -3,6 +3,13 @@ import pytest
3
3
  import polyglot_sql
4
4
 
5
5
 
6
+ def collect_names(node: dict) -> list[str]:
7
+ names = [node.get("name", "")]
8
+ for child in node.get("downstream", []):
9
+ names.extend(collect_names(child))
10
+ return names
11
+
12
+
6
13
  def test_lineage_returns_dict():
7
14
  sql = "SELECT o.total FROM orders o JOIN users u ON o.user_id = u.id"
8
15
  result = polyglot_sql.lineage("total", sql, dialect="postgres")
@@ -10,6 +17,14 @@ def test_lineage_returns_dict():
10
17
  assert "name" in result
11
18
 
12
19
 
20
+ def test_lineage_schema_less_cte_star_passthrough():
21
+ sql = "WITH c AS (SELECT * FROM t) SELECT SUM(c.x) AS s FROM c GROUP BY 1"
22
+ result = polyglot_sql.lineage("s", sql, dialect="generic")
23
+
24
+ names = collect_names(result)
25
+ assert "t.x" in names
26
+
27
+
13
28
  def test_source_tables_returns_orders():
14
29
  sql = "SELECT o.total FROM orders o JOIN users u ON o.user_id = u.id"
15
30
  tables = polyglot_sql.source_tables("total", sql, dialect="postgres")
@@ -60,12 +75,6 @@ def test_lineage_with_schema_resolves_ambiguous_column():
60
75
  sql = "SELECT id FROM users u JOIN orders o ON u.id = o.user_id"
61
76
  result = polyglot_sql.lineage_with_schema("id", sql, schema, dialect="generic")
62
77
 
63
- def collect_names(node: dict) -> list[str]:
64
- names = [node.get("name", "")]
65
- for child in node.get("downstream", []):
66
- names.extend(collect_names(child))
67
- return names
68
-
69
78
  names = collect_names(result)
70
79
  assert any(name == "u.id" for name in names), f"expected u.id in lineage tree, got: {names}"
71
80
 
File without changes