the-other-tim-brown commented on code in PR #13711:
URL: https://github.com/apache/hudi/pull/13711#discussion_r2283754652


##########
hudi-common/src/main/java/org/apache/hudi/avro/ValueMetadata.java:
##########
@@ -0,0 +1,218 @@
+/*
+ * 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.avro;

Review Comment:
   If this class is specific to col-stats, we can consider making a sub-package 
`stats` instead of `avro`



##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/BaseSparkInternalRecordContext.java:
##########
@@ -67,6 +73,30 @@ public static Object 
getFieldValueFromInternalRow(InternalRow row, Schema record
     }
   }
 
+  public static Object getFieldValueFromInternalRowAsJava(InternalRow row, 
Schema recordSchema, String fieldName) {
+    Object value = getFieldValueFromInternalRow(row, recordSchema, fieldName);
+    return sparkTypeToJavaType(value);
+  }
+
+  public static Object sparkTypeToJavaType(Object value) {

Review Comment:
   Just want to confirm, do timestamps get handled as `long` in spark?



##########
hudi-common/src/main/avro/HoodieMetadata.avsc:
##########
@@ -417,6 +417,35 @@
                             "name": "isTightBound",
                             "type": "boolean",
                             "default": false
+                        },
+                        {
+                            "doc": "Value type information containing enum 
ordinal and optional additional information",
+                            "name": "valueType",
+                            "type": [
+                                "null",
+                                {
+                                    "type": "record",
+                                    "name": "HoodieValueTypeInfo",
+                                    "namespace": "org.apache.hudi.avro.model",
+                                    "fields": [
+                                        {
+                                            "doc": "Enum type ordinal 
representing the value type",
+                                            "name": "typeOrdinal",
+                                            "type": "int"

Review Comment:
   Do we want to define the enum here in the schema or how doe we know what 
this corresponds to and ensure it is compatible between releases?



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