voonhous commented on code in PR #19455:
URL: https://github.com/apache/hudi/pull/19455#discussion_r3698531706


##########
hudi-spark-datasource/hudi-spark3.3.x/src/main/scala/org/apache/spark/sql/parser/HoodieSpark3_3ExtendedSqlAstBuilder.scala:
##########
@@ -1277,7 +1244,7 @@ class HoodieSpark3_3ExtendedSqlAstBuilder(conf: SQLConf, 
delegate: ParserInterfa
     // partition transforms for BucketSpec was moved inside parser
     // https://issues.apache.org/jira/browse/SPARK-37923
     val partitioning =
-      partitionExpressions(partTransforms, partCols, ctx) ++ 
bucketSpec.map(_.asTransform)
+    partitionExpressions(partTransforms, partCols, ctx) ++ 
bucketSpec.map(_.asTransform)

Review Comment:
   Fixed, and the direction is flipped per your point: the 3.3 copy was the one 
matching upstream Spark's `AstBuilder`, so all six builders now use the 6-space 
continuation instead of flattening 3.3 to match the drifted five.



##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/dml/schema/TestBlobDataType.scala:
##########
@@ -485,6 +484,18 @@ class TestBlobDataType extends HoodieSparkSqlTestBase with 
ExtendedParserTestHel
       firstLiteralArg(transformByName(plan, "mu_ivl_t")).dataType)
     assertResult(YearMonthIntervalType(YearMonthIntervalType.YEAR, 
YearMonthIntervalType.MONTH))(
       firstLiteralArg(transformByName(plan, "uu_ivl_t")).dataType)
+
+    // Under ANSI keyword mode a bare false must survive visitBooleanLiteral 
as a typed literal,
+    // while a bare true stays a column reference (TRUE is ansiNonReserved, 
FALSE is not).
+    withSQLConf("spark.sql.ansi.enabled" -> "true") {

Review Comment:
   Added `null_t(null, id)` in the ANSI-mode block asserting a `NullType` 
literal, plus the same reachability scaladoc on `visitNullLiteral` in all six 
builders so it is pinned the same way as `visitBooleanLiteral`.



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

Reply via email to