Skip to content

feat(reader): add Spark:DataType:SqlName to result field metadata - #390

Merged
vuanhphung merged 1 commit into
mainfrom
vu-phung/spark-sql-name-metadata
Oct 8, 2026
Merged

vuanhphung merged 1 commit into
mainfrom
vu-phung/spark-sql-name-metadata

Conversation

@vuanhphung

Copy link
Copy Markdown
Collaborator

Summary

Thrift results carry the column type as Spark:DataType:SqlName Arrow field metadata. SEA results through the kernel only carry the databricks.* keys, so code written against Thrift results finds nothing after moving to the kernel. Power BI's Databricks connector and JDBC both read SqlName. The Python connector also moves default-backend connections to the kernel automatically for Reyden warehouses, so those users hit this without opting in.

This sets Spark:DataType:SqlName to the manifest's type_text in augment_schema_with_manifest. Inline, CloudFetch and empty results all pass through that function. The SEA service fills type_text directly from the Thrift server's SqlName (TranslateSchema.toColumn in sql-exec-api), so the value matches Thrift exactly. The C# ADBC driver does the same on its SEA path (adbc-drivers/databricks#330, #440).

Spark:DataType:JsonType is left out for now. SEA only exposes it as type_json behind databricks.sqlexecapi.set_json_type_on_schema, which hasn't been ramped. No known client reads it.

Context: PECOBLR-4124.

Testing

  • New unit test pins the literal key for DECIMAL and ARRAY columns. The post-processor test asserts it on emitted batches.
  • cargo +stable fmt --all, cargo clippy --all-targets -- -D warnings, cargo test

This pull request and its description were written by Isaac.

SEA results only carried databricks.* type keys, so consumers written
against Thrift results (Power BI, JDBC) found no Spark:DataType:SqlName.
Set it from the manifest's type_text, which the SEA service copies from
the Thrift server's SqlName, matching Thrift and the C# ADBC SEA path.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues identified by the review bot.

@vuanhphung
vuanhphung added this pull request to the merge queue Oct 8, 2026
Merged via the queue into main with commit 5353ec8 Oct 8, 2026
21 checks passed
@vuanhphung
vuanhphung deleted the vu-phung/spark-sql-name-metadata branch October 8, 2026 22:55

This branch was previously deployed

1 inactive deployment
azure-prod — edeaf709 Deployed Oct 8, 2026 by vuanhphung via review #903
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.

1 participant