feat(lineage): convert 5 more tests to run on all dialects#2291
Closed
benfdking wants to merge 15 commits intolineage-multi-dialect-supportfrom
Closed
feat(lineage): convert 5 more tests to run on all dialects#2291benfdking wants to merge 15 commits intolineage-multi-dialect-supportfrom
benfdking wants to merge 15 commits intolineage-multi-dialect-supportfrom
Conversation
|
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>
Contributor
Benchmark for a7bcf10Click to view benchmark
|
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
376b89e to
154aac4
Compare
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>
154aac4 to
f4fdde8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR converts 5 more lineage tests to run on all SQL dialects, building on PR #2288.
Tests Converted
test_lineage_sql_with_ctetest_lineage_source_with_ctetest_lineage_source_with_startest_lineage_external_coltest_lineage_valuesTesting
All 5 converted tests pass for all 14 dialects (ansi, athena, bigquery, clickhouse, databricks, duckdb, mysql, postgres, redshift, snowflake, sparksql, sqlite, trino, tsql).
Notes
test_lineage_unionwas attempted but revealed dialect-specific behavior in BigQuery (produces 1 downstream node instead of 3). This will need further investigation in a follow-up PR.Remaining Work
After this PR, there are still ~9 ANSI-only tests to convert in future PRs.