Repository navigation
aitools: stop discover-schema column list at DESCRIBE metadata sections - #7677
Merged
Merged
Conversation
Records current behavior: partition columns are listed twice under COLUMNS and get a duplicate null-count expression, because parseDescribeResult reads past the '# Partition Information' section of DESCRIBE TABLE. Co-authored-by: Isaac <no-reply@databricks.com>
DESCRIBE TABLE lists partition (and clustering) columns in the main column section and then repeats them under '# Partition Information' / '# Clustering Information'. parseDescribeResult skipped the '#' header rows but kept reading, so those columns were reported twice and got duplicate null-count expressions. Stop at the first blank or '#' row. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 1 tests: regression=1 unreleased=0 coverage=0 failing=0
TestAccept/experimental/aitools/tools/discover-schema-partitioned: branch ✅ | main (bf8caad) ❌ | latest (v1.26.0) ❌main (bf8caad): latest (v1.26.0): same output as main (bf8caad) |
andrewnester
approved these changes
Nov 16, 2026
Sankalp-Mittal
left a comment
Contributor
There was a problem hiding this comment.
[AI Generated] Review by review-factory (Claude Fable 5.2 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.
Delta allows column names that start with '#', so the name can't mark the end of the column list; a real column such as '#tag' cut the list short. The blank separator and the section headers are the only rows without a data_type. Also use the fake workspace's default warehouse in the test. Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
Author
|
Follow-ups (out of scope for this PR), from an adversarial review:
|
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.
Changes
discover-schemastops reading DESCRIBE TABLE columns at the first blank or#row.Why
DESCRIBE TABLE repeats partition and clustering columns under
# Partition Information/# Clustering Information. The parser skipped the header rows but kept reading, so those columns were listed twice and their null-count expression was duplicated in the generated SQL.Tests
New acceptance test
acceptance/experimental/aitools/tools/discover-schema-partitionedwith real-shaped DESCRIBE output; the unit-test fixture is updated to the real layout.Found by analyzing test coverage gaps: the code path was not covered by any test.
This pull request and its description were written by Isaac.