PHILO-HE commented on code in PR #9394:
URL: https://github.com/apache/incubator-gluten/pull/9394#discussion_r2059491562


##########
cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc:
##########
@@ -232,6 +232,17 @@ bool SubstraitToVeloxPlanValidator::validateScalarFunction(
   return true;
 }
 
+bool isSupportedArrayCast(const TypePtr& fromType, const TypePtr& toType) {

Review Comment:
   Are all element types supported for `from` array? I note there is no check 
to limit it. Do we need to add more tests if other test cases are not covered 
by Spark UT? Especially, decimal, timestamp.
   
   In Velox's implementation, does array element cast go into the same code 
path for primitive type cast?



##########
gluten-ut/spark32/src/test/scala/org/apache/spark/sql/catalyst/expressions/GlutenCastSuite.scala:
##########
@@ -43,6 +43,56 @@ class GlutenCastSuite extends CastSuite with 
GlutenTestsTrait {
   UDTRegistration.register(classOf[IExampleBaseType].getName, 
classOf[ExampleBaseTypeUDT].getName)
   UDTRegistration.register(classOf[IExampleSubType].getName, 
classOf[ExampleSubTypeUDT].getName)
 
+  test("cast array from IntegerType to StringType") {

Review Comment:
   Suggestion:
   "cast array element from integer to string"
   
   For other tests:
   "cast array element from double to string"
   "cast array element from bool to string"
   "cast array element from date to string"
   
   
   



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