Repository navigation
feat(reader): add Spark:DataType:SqlName to result field metadata - #390
Merged
Merged
Conversation
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>
This branch was previously deployed
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.
Summary
Thrift results carry the column type as
Spark:DataType:SqlNameArrow field metadata. SEA results through the kernel only carry thedatabricks.*keys, so code written against Thrift results finds nothing after moving to the kernel. Power BI's Databricks connector and JDBC both readSqlName. 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:SqlNameto the manifest'stype_textinaugment_schema_with_manifest. Inline, CloudFetch and empty results all pass through that function. The SEA service fillstype_textdirectly from the Thrift server'sSqlName(TranslateSchema.toColumnin 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:JsonTypeis left out for now. SEA only exposes it astype_jsonbehinddatabricks.sqlexecapi.set_json_type_on_schema, which hasn't been ramped. No known client reads it.Context: PECOBLR-4124.
Testing
cargo +stable fmt --all,cargo clippy --all-targets -- -D warnings,cargo testThis pull request and its description were written by Isaac.