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


##########
hudi-spark-datasource/hudi-spark3-common/src/main/scala/org/apache/hudi/Spark3HoodiePartitionCDCFileGroupMapping.scala:
##########
@@ -23,11 +23,12 @@ import org.apache.hudi.common.table.cdc.HoodieCDCFileSplit
 
 import org.apache.spark.sql.catalyst.InternalRow
 
-class HoodiePartitionCDCFileGroupMapping(partitionValues: InternalRow,
-                                         fileSplits: List[HoodieCDCFileSplit])
-  extends HoodiePartitionValues(partitionValues) {
+class Spark3HoodiePartitionCDCFileGroupMapping(partitionValues: InternalRow,

Review Comment:
   I feel like it's better to leave `InternalRow` alone without all the changes 
if possible.  It has a large blast radius of the changes in this PR.



##########
hudi-spark-datasource/hudi-spark3.0.x/src/main/scala/org/apache/spark/sql/adapter/Spark3_0Adapter.scala:
##########


Review Comment:
   This class no longer exist.



##########
hudi-spark-datasource/hudi-spark3-common/src/main/java/org/apache/hudi/client/model/Spark3HoodieInternalRow.java:
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.client.model;
+
+import org.apache.spark.sql.catalyst.InternalRow;
+import org.apache.spark.unsafe.types.UTF8String;
+
+public class Spark3HoodieInternalRow extends HoodieInternalRow {
+
+  public Spark3HoodieInternalRow(UTF8String commitTime,
+      UTF8String commitSeqNumber,
+      UTF8String recordKey,
+      UTF8String partitionPath,
+      UTF8String fileName,
+      InternalRow sourceRow,
+      boolean sourceContainsMetaFields) {
+    super(commitTime, commitSeqNumber, recordKey, partitionPath, fileName, 
sourceRow, sourceContainsMetaFields);
+  }
+
+  public Spark3HoodieInternalRow(UTF8String[] metaFields,

Review Comment:
   Keep only one constructor



##########
hudi-spark-datasource/hudi-spark3.1.x/src/main/scala/org/apache/spark/sql/adapter/Spark3_1Adapter.scala:
##########


Review Comment:
   This class no longer exist.



##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/feature/index/TestSecondaryIndex.scala:
##########
@@ -115,6 +115,11 @@ class TestSecondaryIndex extends HoodieSparkSqlTestBase {
           Seq("secondary_index_idx_name", "secondary_index", "name"),
           Seq("record_index", "record_index", "")
         )
+        //checkAnswer(s"create index idx_name on $tableName using lucene 
(name) options(block_size=1024)")()

Review Comment:
   Remove comments



##########
hudi-spark-datasource/hudi-spark3.3.x/src/main/scala/org/apache/spark/sql/adapter/Spark3_3Adapter.scala:
##########
@@ -150,4 +154,12 @@ class Spark3_3Adapter extends BaseSpark3Adapter {
   override def stopSparkContext(jssc: JavaSparkContext, exitCode: Int): Unit = 
{
     jssc.stop()
   }
+
+  override def getSchema(conn: Connection,
+                         resultSet: ResultSet,
+                         dialect: JdbcDialect,
+                         alwaysNullable: Boolean = false,
+                         isTimestampNTZ: Boolean = false): StructType = {
+    JdbcUtils.getSchema(resultSet, dialect, alwaysNullable)

Review Comment:
   Move to the logic to the utilities module as suggested in the other comment.



##########
hudi-spark-datasource/hudi-spark3.2.x/src/main/scala/org/apache/spark/sql/adapter/Spark3_2Adapter.scala:
##########


Review Comment:
   This class no longer exist.



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