yihua commented on code in PR #10225:
URL: https://github.com/apache/hudi/pull/10225#discussion_r1422898633
##########
hudi-common/src/main/java/org/apache/hudi/internal/schema/utils/AvroSchemaEvolutionUtils.java:
##########
@@ -140,10 +140,14 @@ public static Schema reconcileSchema(Schema
incomingSchema, Schema oldTableSchem
* @return schema (based off {@code source} one) that has nullability
constraints and datatypes reconciled
*/
public static Schema reconcileSchemaRequirements(Schema sourceSchema, Schema
targetSchema, Map<String, String> opts) {
- if (sourceSchema.getType() == Schema.Type.NULL ||
sourceSchema.getFields().isEmpty() || targetSchema.getFields().isEmpty()) {
+ if (targetSchema.getType() == Schema.Type.NULL ||
targetSchema.getFields().isEmpty()) {
Review Comment:
Are these required for this patch or they can be separated out as a separate
fix?
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/HoodieFileGroupReaderBasedParquetFileFormat.scala:
##########
@@ -65,6 +66,8 @@ class HoodieFileGroupReaderBasedParquetFileFormat(tableState:
HoodieTableState,
requiredFilters: Seq[Filter]
) extends ParquetFileFormat with
SparkAdapterSupport with HoodieFormatTrait {
+ override def getRequiredFilters: Seq[Filter] = requiredFilters
Review Comment:
Do we already support `hoodie.data source.read.incr.filters` for incremental
pulls in the new Hudi parquet file format?
##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/spark/sql/HoodieCatalystPlansUtils.scala:
##########
@@ -140,4 +142,6 @@ trait HoodieCatalystPlansUtils {
def failAnalysisForMIT(a: Attribute, cols: String): Unit = {}
def createMITJoin(left: LogicalPlan, right: LogicalPlan, joinType: JoinType,
condition: Option[Expression], hint: String): LogicalPlan
+
+ def sameOutput(a: LogicalPlan, b: LogicalPlan): Boolean
Review Comment:
rename to sth like `areSameLogicalPlans`?
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/HoodieFileGroupReaderBasedParquetFileFormat.scala:
##########
@@ -278,6 +276,8 @@ class
HoodieFileGroupReaderBasedParquetFileFormat(tableState: HoodieTableState,
val baseFileReader = super.buildReaderWithPartitionValues(sparkSession,
dataSchema, partitionSchema, requiredSchema,
filters ++ requiredFilters, options, new Configuration(hadoopConf))
m.put(generateKey(dataSchema, requiredSchema), baseFileReader)
+ m.put(0, super.buildReaderWithPartitionValues(sparkSession, dataSchema,
partitionSchema, requiredSchema,
Review Comment:
Why is the key `0`?
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/NewFileFormatUtils.scala:
##########
@@ -0,0 +1,146 @@
+/*
+ * 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.
+ */
+
+/*
+ * 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.
+ */
Review Comment:
Redundant licence?
--
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]