alexeykudinkin commented on a change in pull request #3893:
URL: https://github.com/apache/hudi/pull/3893#discussion_r791267751
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieRecord.java
##########
@@ -18,21 +18,21 @@
package org.apache.hudi.common.model;
-import java.util.Map;
-import java.util.stream.Collectors;
-import java.util.stream.IntStream;
import org.apache.hudi.common.util.CollectionUtils;
import org.apache.hudi.common.util.Option;
+import org.apache.hudi.common.util.collection.Pair;
import java.io.Serializable;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
-import org.apache.hudi.common.util.collection.Pair;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
/**
* A Single Record managed by Hoodie.
*/
-public class HoodieRecord<T extends HoodieRecordPayload> implements
Serializable {
+public abstract class HoodieRecord<T> implements Serializable {
Review comment:
@yihua @xushiyan let's chat more on this to make sure we're aligned on
the approach going f/w:
I was thinking of keeping this component file-format agnostic and instead
make it engine-specific, while refactoring MOR table read-path for efficient
querying.
Can you elaborate what's the goal you're striving for w/ `HoodieAvroRecord`?
P.S. Putting this context in here for somebody who might not be aware of
previous conversations
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieAvroRecord.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.common.model;
+
+public class HoodieAvroRecord<T extends HoodieRecordPayload> extends
HoodieRecord<T> {
Review comment:
@yihua sorry, not sure i understood your point. Can you elaborate?
Why do we want to extend `HoodieAvroRecord` with format-specific impl?
##########
File path:
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/HoodieIndexUtils.java
##########
@@ -87,14 +87,14 @@
* @return the tagged {@link HoodieRecord}
*/
public static HoodieRecord getTaggedRecord(HoodieRecord inputRecord,
Option<HoodieRecordLocation> location) {
- HoodieRecord record = inputRecord;
+ HoodieRecord<?> record = inputRecord;
Review comment:
Thanks for fixing this!
--
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]