cloud-fan commented on code in PR #44316:
URL: https://github.com/apache/spark/pull/44316#discussion_r1430979164


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/finishAnalysis.scala:
##########
@@ -70,6 +74,33 @@ object RewriteNonCorrelatedExists extends Rule[LogicalPlan] {
   }
 }
 
+/**
+ * Computes expressions in inline tables. This rule is supposed to be called 
at the very end
+ * of the analysis phase, given that all the expressions need to be fully 
resolved/replaced
+ * at this point.
+ */
+object EvalInlineTables extends Rule[LogicalPlan] with CastSupport {
+  override def apply(plan: LogicalPlan): LogicalPlan = 
plan.transformDownWithSubqueriesAndPruning(
+    AlwaysProcess.fn, ruleId) {
+    case table: ResolvedInlineTable =>
+      val newRows: Seq[InternalRow] =
+        table.rows.map { row => InternalRow.fromSeq(
+            row.map(e =>

Review Comment:
   nit: for multi-line lambda we should wrap with `row.map { e => ...`



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