ericyangliu opened a new pull request, #7516:
URL: https://github.com/apache/kyuubi/pull/7516

   ### Why are the changes needed?
   
   Fixes #7515.
   
   Spark 4 introduced `VariantType`. Kyuubi's Spark schema conversion did not 
map it when building HiveServer2 result-set metadata, so `GetResultSetMetadata` 
could fail with `Unrecognized type name: variant` even when the query itself 
completed.
   
   This patch maps Spark `VariantType` to the existing string/VARCHAR metadata 
representation.
   
   ### How was this patch tested?
   
   - Added `SchemaHelperSuite` coverage for `VariantType` mapping to 
`TTypeId.STRING_TYPE` and `java.sql.Types.VARCHAR`.
   - Added a Spark 4 result-set metadata regression test using 
`parse_json('{"a":1}') AS v`.
   - `git diff --check`
   - `./build/mvn test -pl externals/kyuubi-spark-sql-engine -am -Dtest=none 
-DwildcardSuites=org.apache.kyuubi.engine.spark.schema.SchemaHelperSuite`
   - `env 
JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home 
PATH=/opt/homebrew/opt/openjdk@17/bin:$PATH ./build/mvn test -pl 
externals/kyuubi-spark-sql-engine -Dtest=none 
-Dsuites=org.apache.kyuubi.engine.spark.operation.SparkOperationSuite 
-Dtests='get result set metadata with variant column' -Pspark-4.1 -Pscala-2.13`
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Assisted-by: OpenAI Codex
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to