zml1206 commented on code in PR #12444:
URL: https://github.com/apache/gluten/pull/12444#discussion_r3548553889
##########
backends-velox/src-delta40/main/scala/org/apache/spark/sql/delta/GlutenOptimisticTransaction.scala:
##########
@@ -48,6 +49,14 @@ class GlutenOptimisticTransaction(delegate:
OptimisticTransaction)
writeOptions: Option[DeltaOptions],
isOptimize: Boolean,
additionalConstraints: Seq[Constraint]): Seq[FileAction] = {
+ // Velox has no Arrow representation for VariantType: the native write
path inserts a
+ // RowToVeloxColumnarExec transition whose SparkArrowUtil.toArrowSchema
call throws
+ // `Unsupported data type: variant` at runtime. Delegate writes whose
schema contains a
+ // variant column to the vanilla Delta write path instead of offloading
them.
+ if (inputData.schema.existsRecursively(_.isInstanceOf[VariantType])) {
Review Comment:
Thanks, could we reuse the existing VeloxValidatorApi.validateSchema /
doSchemaValidate for Delta/native write schema validation instead of adding
another one-off VariantType guard? That would make unsupported Spark types fail
consistently before RowToVeloxColumnarExec / Arrow schema conversion.
--
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]