yihua commented on code in PR #12772:
URL: https://github.com/apache/hudi/pull/12772#discussion_r2365838777


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/dml/others/TestMergeIntoTable2.scala:
##########
@@ -137,6 +137,11 @@ class TestMergeIntoTable2 extends HoodieSparkSqlTestBase {
         Seq(0)
       )
 
+      val errorMsg = if (HoodieSparkUtils.gteqSpark4_0)
+        "[INTERNAL_ERROR] Eagerly executed command failed. You hit a bug in 
Spark or the Spark plugins you use. Please, report this bug to the 
corresponding communities or vendors, and provide the full stack trace. 
SQLSTATE: XX000"

Review Comment:
   To revisit: is the error not properly thrown?



##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/feature/index/TestIndexSyntax.scala:
##########
@@ -73,7 +73,7 @@ class TestIndexSyntax extends HoodieSparkSqlTestBase {
         
assertResult(false)(resolvedLogicalPlan.asInstanceOf[CreateIndexCommand].ignoreIfExists)
         assertResult(Map("block_size" -> 
"1024"))(resolvedLogicalPlan.asInstanceOf[CreateIndexCommand].options)
 
-        logicalPlan = sqlParser.parsePlan(s"create index if not exists 
idx_price on $tableName using lucene (price options(order='desc')) 
options(block_size=512)")
+        logicalPlan = sqlParser.parsePlan(s"create index if not exists 
idx_price on $tableName using lucene (price options(`order`='desc')) 
options(block_size=512)")

Review Comment:
   We should update the syntax of CREATE INDEX on Spark 4.



##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/procedure/TestSavepointsProcedure.scala:
##########
@@ -376,6 +376,7 @@ class TestSavepointsProcedure extends 
HoodieSparkProcedureTestBase {
       checkAnswer(s"""call create_savepoint('$tableName', 
'${commits(0)}')""")(Seq(true))
       checkAnswer(s"""call create_savepoint('$tableName', 
'${commits(1)}')""")(Seq(true))
 
+      spark.table(s"$tableName").select("id").count()

Review Comment:
   Same here



##########
hudi-spark-datasource/hudi-spark3.3.x/src/main/scala/org/apache/spark/sql/adapter/Spark3_3Adapter.scala:
##########
@@ -166,4 +168,13 @@ class Spark3_3Adapter extends BaseSpark3Adapter {
     value == LegacyBehaviorPolicy.LEGACY
   }
 
+  override def isTimestampNTZType(dataType: DataType): Boolean = false
+
+  override def getSchema(conn: Connection,

Review Comment:
   Move to `HoodieSchemaUtils`



##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/procedure/TestCallProcedure.scala:
##########
@@ -160,6 +160,7 @@ class TestCallProcedure extends 
HoodieSparkProcedureTestBase {
       var commits = spark.sql(s"""call show_commits(table => '$tableName', 
limit => 10)""").collect()
       assertResult(3){commits.length}
 
+      spark.table(s"$tableName").select("id").count

Review Comment:
   nit: remove the line not used



##########
hudi-spark-datasource/hudi-spark3.4.x/pom.xml:
##########
@@ -249,6 +249,13 @@
       <scope>provided</scope>
     </dependency>
 
+    <!-- Hoodie Spark 3.x common  -->
+    <dependency>
+      <groupId>org.apache.hudi</groupId>
+      <artifactId>hudi-spark3-common</artifactId>
+      <version>${project.version}</version>
+    </dependency>

Review Comment:
   nit: move this up



##########
hudi-spark-datasource/hudi-spark3-common/src/main/scala/org/apache/spark/sql/hudi/command/MergeIntoHoodieTableCommand.scala:
##########
@@ -163,7 +165,7 @@ case class MergeIntoHoodieTableCommand(mergeInto: 
MergeIntoTable,
     if (primaryKeyFields.isPresent) {
       //pkless tables can have more complex conditions
       if (!conditions.forall(p => p.isInstanceOf[EqualTo])) {
-        throw new AnalysisException(s"Currently only equality predicates are 
supported in MERGE INTO statement on record key table" +
+        throw new HoodieAnalysisException(s"Currently only equality predicates 
are supported in MERGE INTO statement on primary key table" +

Review Comment:
   Revert error message change



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