Skip to content

feat(lineage): convert 5 more tests to run on all dialects#2291

Closed
benfdking wants to merge 15 commits intolineage-multi-dialect-supportfrom
lineage-convert-remaining-tests
Closed

feat(lineage): convert 5 more tests to run on all dialects#2291
benfdking wants to merge 15 commits intolineage-multi-dialect-supportfrom
lineage-convert-remaining-tests

Conversation

@benfdking
Copy link
Copy Markdown
Collaborator

This PR converts 5 more lineage tests to run on all SQL dialects, building on PR #2288.

Tests Converted

  • test_lineage_sql_with_cte
  • test_lineage_source_with_cte
  • test_lineage_source_with_star
  • test_lineage_external_col
  • test_lineage_values

Testing

All 5 converted tests pass for all 14 dialects (ansi, athena, bigquery, clickhouse, databricks, duckdb, mysql, postgres, redshift, snowflake, sparksql, sqlite, trino, tsql).

Notes

Remaining Work

After this PR, there are still ~9 ANSI-only tests to convert in future PRs.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…rectory (#2285)

chore: bump time in the cargo group across 1 directory

Bumps the cargo group with 1 update in the / directory: [time](https://github.com/time-rs/time).

Updates `time` from 0.3.46 to 0.3.47
- [Release notes](https://github.com/time-rs/time/releases)
- [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md)
- [Commits](time-rs/time@v0.3.46...v0.3.47)

---
updated-dependencies:
- dependency-name: time
  dependency-version: 0.3.47
  dependency-type: indirect
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 6, 2026

Benchmark for a7bcf10

Click to view benchmark
Test Base PR %
DepthMap::from_parent 52.4±0.42µs 52.5±0.43µs +0.19%
fix_complex_query 12.3±0.07ms 12.3±0.05ms 0.00%
fix_superlong 156.1±5.85ms 160.0±12.38ms +2.50%
parse_complex_query 4.1±0.06µs 4.2±0.03µs +2.44%
parse_expression_recursion 7.1±0.10µs 7.2±0.44µs +1.41%
parse_simple_query 1036.1±13.14ns 1108.1±24.75ns +6.95%

Two calls to str::repeat() in lint_line_untaken_positive_indents and
lint_line_untaken_negative_indents computed the repeat count as
(closing_indent_balance - untaken_indents.len()) cast to usize. When
untaken_indents.len() exceeded closing_indent_balance, the subtraction
went negative and the as-usize cast wrapped to a huge value, causing
a capacity overflow panic.

Add .max(0) before the cast, matching the pattern already used at
line 834 in the same file.

Fixes #2289
@benfdking benfdking force-pushed the lineage-convert-remaining-tests branch from 376b89e to 154aac4 Compare February 6, 2026 16:12
benfdking and others added 13 commits February 9, 2026 09:25
Every dialect always sets lexer_matchers before use, and accessing it
when unset panicked anyway. Change the field from Option<Vec<Matcher>>
to Vec<Matcher> to simplify the type and remove unnecessary Option
wrapping/unwrapping in the accessor and mutator methods.

https://claude.ai/code/session_019YZ4zYJqBZEwwRACN3Lqcr

Co-authored-by: Claude <noreply@anthropic.com>
Bumps [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react-swc) from 4.2.2 to 4.2.3.
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/plugin-react-swc@4.2.3/packages/plugin-react-swc)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react-swc"
  dependency-version: 4.2.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [PyO3/maturin-action](https://github.com/pyo3/maturin-action) from 1.49.4 to 1.50.0.
- [Release notes](https://github.com/pyo3/maturin-action/releases)
- [Commits](PyO3/maturin-action@86b9d13...b1bd829)

---
updated-dependencies:
- dependency-name: PyO3/maturin-action
  dependency-version: 1.50.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [CodSpeedHQ/action](https://github.com/codspeedhq/action) from 4.10.2 to 4.10.5.
- [Release notes](https://github.com/codspeedhq/action/releases)
- [Changelog](https://github.com/CodSpeedHQ/action/blob/main/CHANGELOG.md)
- [Commits](CodSpeedHQ/action@2084259...9a74b6b)

---
updated-dependencies:
- dependency-name: CodSpeedHQ/action
  dependency-version: 4.10.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: hermetic Python venv for cargo_test in Bazel sandbox

Replace the no-sandbox sh_test cargo_test with a fully hermetic
cargo_test rule that pre-caches a Python environment using the
Bazel-managed Python 3.12 runtime and uv for pip installs.

- Add python_venv rule that copies @python_3_12 runtime and installs
  dev dependencies (maturin, pytest, jinja2, dbt, etc.) into it
- Add python_venv_provider to carry PythonVenvInfo between rules
- Extend cargo_test rule with optional python_venv attribute that
  sets up PYO3_PYTHON, PYTHONHOME, VIRTUAL_ENV, and library paths
- Fix file copying to use heredoc for space-safe filenames
- No network access needed at test time - everything is pre-cached

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: run bazel mod tidy

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use --prefix for uv pip install to ensure scripts land in bin/

The standalone Python from rules_python may have a sysconfig scheme
that installs scripts to a directory other than <prefix>/bin/ when
using --break-system-packages. Switch to --prefix to guarantee
maturin and other tools are installed to the expected bin/ directory.

Also adds a verification check to fail fast if maturin is missing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* temp

* isolating the python test

* running the jobs

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Bumps [regex-automata](https://github.com/rust-lang/regex) from 0.4.13 to 0.4.14.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](rust-lang/regex@regex-automata-0.4.13...regex-automata-0.4.14)

---
updated-dependencies:
- dependency-name: regex-automata
  dependency-version: 0.4.14
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… 1 directory (#2306)

chore: bump cryptography in the uv group across 1 directory

Bumps the uv group with 1 update in the / directory: [cryptography](https://github.com/pyca/cryptography).


Updates `cryptography` from 46.0.3 to 46.0.5
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](pyca/cryptography@46.0.3...46.0.5)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 46.0.5
  dependency-type: indirect
  dependency-group: uv
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ling

This commit enables lineage tests to run across all SQL dialects and fixes
a critical issue where dialects using ObjectReference (like Databricks) were
not being handled correctly.

Changes:
- Add `all_dialects()` helper function using DialectKind::iter()
- Fix `parse_sql()` to use parser's dialect instead of hardcoding ANSI lexer
- Add support for SyntaxKind::ObjectReference in IR lowering (fixes Databricks)
- Convert `test_lineage` to run for all dialects with proper error messages
- Add strum as dev dependency for dialect iteration

The key fix is handling ObjectReference nodes - Databricks (and potentially
other dialects) define TableReferenceSegment as ObjectReferenceSegment rather
than using NodeMatcher with SyntaxKind::TableReference like ANSI does.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Convert the following tests to run on all SQL dialects:
- test_lineage_sql_with_cte
- test_lineage_source_with_cte
- test_lineage_source_with_star
- test_lineage_external_col
- test_lineage_values

All tests pass for all 14 dialects. The test_lineage_union test was
not converted yet as it revealed dialect-specific behavior in BigQuery
that needs further investigation.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@benfdking benfdking force-pushed the lineage-convert-remaining-tests branch from 154aac4 to f4fdde8 Compare February 11, 2026 09:13
@benfdking benfdking closed this Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants