wgtmac commented on code in PR #1192:
URL: https://github.com/apache/parquet-mr/pull/1192#discussion_r1413400005


##########
pom.xml:
##########
@@ -619,6 +622,9 @@
             <configuration>
               <failOnWarning>true</failOnWarning>
               <ignoreNonCompile>true</ignoreNonCompile>
+              <ignoredDependencies>
+                
<dependency>javax.annotation:javax.annotation-api:jar:1.3.2</dependency>

Review Comment:
   Why do we need to ignore this?



##########
parquet-thrift/src/main/java/org/apache/parquet/thrift/ThriftSchemaConverter.java:
##########
@@ -225,14 +225,18 @@ private static ThriftField toThriftField(String name, 
Field field, ThriftField.R
         final Field listElemField = field.getListElemField();
         type = new ThriftType.ListType(toThriftField(listElemField.getName(), 
listElemField, requirement));
         break;
+      case UUID:
       case ENUM:
-        Collection<TEnum> enumValues = field.getEnumValues();
-        List<EnumValue> values = new ArrayList<ThriftType.EnumValue>();
-        for (TEnum tEnum : enumValues) {
-          values.add(new EnumValue(tEnum.getValue(), tEnum.toString()));
+        if (field.isEnum()) {

Review Comment:
   Why mixing UUID and ENUM in this case?



##########
parquet-format-structures/pom.xml:
##########
@@ -156,6 +156,11 @@
       <artifactId>libthrift</artifactId>
       <version>${format.thrift.version}</version>
     </dependency>
+    <dependency>
+      <groupId>javax.annotation</groupId>
+      <artifactId>javax.annotation-api</artifactId>

Review Comment:
   Where do we need this?



##########
parquet-thrift/src/main/java/org/apache/parquet/thrift/struct/ThriftTypeID.java:
##########
@@ -51,10 +51,15 @@ public enum ThriftTypeID {
   LIST (TType.LIST, true, ListType.class),
   ENUM (TType.ENUM, TType.I32, EnumType.class);
 
-  private static ThriftTypeID[] types = new ThriftTypeID[17];
+  private static final ThriftTypeID[] types;
   static {
+    types = new ThriftTypeID[18];
     for (ThriftTypeID t : ThriftTypeID.values()) {
-      types[t.thriftType] = t;
+      if (t.thriftType == -1) {

Review Comment:
   It would be good to add the link to the comment as well. Or at least we need 
to explain why -1 is used here.



-- 
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: dev-unsubscr...@parquet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to