-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Kernel connector] Handle unsupported data types in kernel-spark connector #5273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we rename spark-variant-checkpoint
to just variant
?
assertThrows( | ||
RuntimeException.class, | ||
() -> { | ||
spark.sql("SELECT * FROM `dsv2`.`delta`.`" + tablePath + "`").collect(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error comes from:
at io.delta.kernel.spark.utils.SchemaUtils.convertKernelDataTypeToSparkDataType(SchemaUtils.java:116)
at io.delta.kernel.spark.utils.SchemaUtils.convertKernelSchemaToSparkSchema(SchemaUtils.java:60)
It seesm that it is already handled in SchemaUtils
. In such a case, we can just remove all the code changes in SparkTable.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, when getting table schema from Unity catalog, we can check whether the UC schema is supported in Kernel. For example, the Time type is not supported yet.
Which Delta project/connector is this regarding?
Description
Allowlist for kernel-Spark connector supported schema data types.
We now fail with a more descriptive error message when schema data types are unsupported:
How was this patch tested?
Added a new golden table file, variant-spark-checkpoint
Does this PR introduce any user-facing changes?
Yes, updates the user-facing error message to be more descriptive