PHILO-HE commented on code in PR #8320:
URL: https://github.com/apache/incubator-gluten/pull/8320#discussion_r1978983214
##########
backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxSparkPlanExecApi.scala:
##########
@@ -690,6 +690,33 @@ class VeloxSparkPlanExecApi extends SparkPlanExecApi {
GenericExpressionTransformer(substraitExprName, children, expr)
}
+ /** Generate an expression transformer to transform JsonToStructs to
Substrait. */
+ override def genFromJsonTransformer(
+ substraitExprName: String,
+ children: Seq[ExpressionTransformer],
+ expr: JsonToStructs): ExpressionTransformer = {
+ if (!GlutenConfig.getConf.enableVeloxFromJsonFunction) {
+ throw new GlutenNotSupportException("'from_json' is not supported in
Velox")
+ }
+ if (!SparkShimLoader.getSparkShims.fromJsonSupportPartialResults) {
Review Comment:
@zhli1142015, can we simply depend on the below value returned?
`conf.getBoolean("spark.sql.json.enablePartialResults", false)`
Assume if this key is not defined in lower Spark version, the default value
(2nd arg) will be used.
Moreover, I note false is the default value in your added API, does this
mean partial result is NOT allowed in lower Spark version (< 3.4)? Better to
add one comment to clarify. Thank you!
--
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]