You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "PHILO-HE (via GitHub)" <gi...@apache.org> on 2025/04/25 03:08:02 UTC
Re: [PR] [GLUTEN-9392] [VL] Support casting array element to varchar [incubator-gluten]
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org