gengliangwang commented on code in PR #41191:
URL: https://github.com/apache/spark/pull/41191#discussion_r1209789175


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -2406,6 +2407,15 @@ class Analyzer(override val catalogManager: 
CatalogManager) extends RuleExecutor
     }
   }
 
+  /** Helper method to resolve function calls within expressions of TableSpec 
options. */
+  def ResolveTableSpecOption(expression: Expression): Expression = {
+    val analyzed = executeSameContext(Project(Seq(Alias(expression, "col")()), 
OneRowRelation()))
+    val folded = ConstantFolding(analyzed)
+    folded match {
+      case Project(Seq(Alias(expression, _)), _) => expression

Review Comment:
   Do we need error handling if the pattern doesn't match?



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