PHILO-HE commented on code in PR #6406:
URL: https://github.com/apache/incubator-gluten/pull/6406#discussion_r1673694983
##########
gluten-core/src/main/scala/org/apache/gluten/extension/GlutenPlan.scala:
##########
@@ -65,7 +65,13 @@ trait GlutenPlan extends SparkPlan with
Convention.KnownBatchType with LogLevelU
final def doValidate(): ValidationResult = {
try {
TransformerState.enterValidation
- val res = doValidateInternal()
+ val res = BackendsApiManager.getValidatorApiInstance
+ .doSchemaValidate(schema)
+ .map {
+ reason =>
+ ValidationResult.notOk(s"Found schema check failure for $schema,
due to: $reason")
+ }
+ .getOrElse(doValidateInternal())
Review Comment:
It would be better to move schema check before
`TransformerState.enterValidation`. The transformer state is required by
`tranform` method called by `doValidateInternal`. So before
`doValidateInternal` is called, we don't need to set that state.
--
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]