dbatomic commented on code in PR #44316:
URL: https://github.com/apache/spark/pull/44316#discussion_r1424536555


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveInlineTables.scala:
##########
@@ -33,12 +34,14 @@ import org.apache.spark.sql.types.{StructField, StructType}
  */
 object ResolveInlineTables extends Rule[LogicalPlan]
   with CastSupport with AliasHelper with EvalHelper {
-  override def apply(plan: LogicalPlan): LogicalPlan = 
plan.resolveOperatorsWithPruning(
-    AlwaysProcess.fn, ruleId) {
-    case table: UnresolvedInlineTable if table.expressionsResolved =>
-      validateInputDimension(table)
-      validateInputEvaluable(table)
-      convert(table)
+  override def apply(plan: LogicalPlan): LogicalPlan = {
+    plan.resolveOperatorsDown(p => 
ComputeCurrentTime(p)).resolveOperatorsWithPruning(

Review Comment:
   I did try that originally but I got:
   `      throw QueryExecutionErrors.methodCalledInAnalyzerNotAllowedError()` 
   
   I ended up with resolveOperatorsDown due to this comment:
   ```scala
     /**
      * In analyzer, use [[resolveOperatorsDown()]] instead. If this is used in 
the analyzer,
      * an exception will be thrown in test mode. It is however OK to call this 
function within
      * the scope of a [[resolveOperatorsDown()]] call.
      * @see 
[[org.apache.spark.sql.catalyst.trees.TreeNode.transformDownWithPruning()]].
      */
     override def transformDownWithPruning(cond: TreePatternBits => Boolean,
   
   ```



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to