andygrove commented on code in PR #5079:
URL: https://github.com/apache/datafusion-comet/pull/5079#discussion_r3674125403


##########
spark/src/main/scala/org/apache/comet/expressions/CometCast.scala:
##########
@@ -25,24 +25,24 @@ import org.apache.spark.sql.types.{ArrayType, DataType, 
DataTypes, DecimalType,
 
 import org.apache.comet.CometConf
 import org.apache.comet.CometSparkSessionExtensions.{isSpark40Plus, 
withFallbackReason}
-import org.apache.comet.serde.{CometExpressionSerde, Compatible, 
ExprOuterClass, Incompatible, SupportLevel, Unsupported}
+import org.apache.comet.DataTypeSupport.isComplexType
+import org.apache.comet.serde.{CodegenDispatchFallback, CometExpressionSerde, 
Compatible, ExprOuterClass, Incompatible, SupportLevel, Unsupported}
 import org.apache.comet.serde.ExprOuterClass.Expr
 import org.apache.comet.serde.QueryPlanSerde.{evalModeToProto, 
exprToProtoInternal, serializeDataType}
-import org.apache.comet.shims.CometExprShim
+import org.apache.comet.shims.{CometExprShim, CometTypeShim}
 
-object CometCast extends CometExpressionSerde[Cast] with CometExprShim {
+object CometCast
+    extends CometExpressionSerde[Cast]
+    with CometExprShim
+    with CometTypeShim
+    with CodegenDispatchFallback {
 
   // Shared with CometCastSuite so the asserted reason cannot drift from 
production.
   private[comet] val negativeScaleDecimalToStringReason: String =
     "Negative-scale decimal requires 
spark.sql.legacy.allowNegativeScaleOfDecimal=true"
 
-  // When `spark.sql.legacy.castComplexTypesToString.enabled` is true, Spark 
wraps maps and
-  // structs with `[]` (instead of `{}`) when casting to string, and omits 
NULL elements of
-  // structs/maps/arrays (instead of rendering them as the literal "null"). 
Comet only
-  // implements the default formatting, so fall back to Spark for any 
array/map/struct to-string
-  // cast when the flag is enabled. The flag is internal in Spark 4.0 and 
defaults to false.

Review Comment:
   Why is this comment removed? It seems useful to me



-- 
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