[ 
https://issues.apache.org/jira/browse/PARQUET-1335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16521892#comment-16521892
 ] 

ASF GitHub Bot commented on PARQUET-1335:
-----------------------------------------

gszadovszky closed pull request #496: PARQUET-1335: Logical type names in 
parquet-mr are not consistent with parquet-format
URL: https://github.com/apache/parquet-mr/pull/496
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/parquet-column/src/main/java/org/apache/parquet/schema/LogicalTypeAnnotation.java
 
b/parquet-column/src/main/java/org/apache/parquet/schema/LogicalTypeAnnotation.java
index e22867aec..84305939f 100644
--- 
a/parquet-column/src/main/java/org/apache/parquet/schema/LogicalTypeAnnotation.java
+++ 
b/parquet-column/src/main/java/org/apache/parquet/schema/LogicalTypeAnnotation.java
@@ -37,7 +37,7 @@ protected LogicalTypeAnnotation fromString(List<String> 
params) {
         return listType();
       }
     },
-    UTF8 {
+    STRING {
       @Override
       protected LogicalTypeAnnotation fromString(List<String> params) {
         return stringType();
@@ -88,7 +88,7 @@ protected LogicalTypeAnnotation fromString(List<String> 
params) {
         return timestampType(Boolean.parseBoolean(params.get(1)), 
TimeUnit.valueOf(params.get(0)));
       }
     },
-    INT {
+    INTEGER {
       @Override
       protected LogicalTypeAnnotation fromString(List<String> params) {
         if (params.size() != 2) {
@@ -273,7 +273,7 @@ public void accept(LogicalTypeAnnotationVisitor 
logicalTypeAnnotationVisitor) {
 
     @Override
     LogicalTypeToken getType() {
-      return LogicalTypeToken.UTF8;
+      return LogicalTypeToken.STRING;
     }
 
     @Override
@@ -646,7 +646,7 @@ public void accept(LogicalTypeAnnotationVisitor 
logicalTypeAnnotationVisitor) {
 
     @Override
     LogicalTypeToken getType() {
-      return LogicalTypeToken.INT;
+      return LogicalTypeToken.INTEGER;
     }
 
     @Override
diff --git 
a/parquet-column/src/test/java/org/apache/parquet/parser/TestParquetParser.java 
b/parquet-column/src/test/java/org/apache/parquet/parser/TestParquetParser.java
index 5082501af..1abd56a26 100644
--- 
a/parquet-column/src/test/java/org/apache/parquet/parser/TestParquetParser.java
+++ 
b/parquet-column/src/test/java/org/apache/parquet/parser/TestParquetParser.java
@@ -47,7 +47,7 @@
 
 public class TestParquetParser {
   @Test
-  public void testPaperExample() throws Exception {
+  public void testPaperExample() {
     String example =
         "message Document {\n" +
         "  required int64 DocId;\n" +
@@ -122,7 +122,7 @@ public void testEachPrimitiveType() {
   public void testUTF8Annotation() {
     String message =
         "message StringMessage {\n" +
-        "  required binary string (UTF8);\n" +
+        "  required binary string (STRING);\n" +
         "}\n";
 
     MessageType parsed = parseMessageType(message);
@@ -139,7 +139,7 @@ public void testUTF8Annotation() {
   public void testIDs() {
     String message =
         "message Message {\n" +
-        "  required binary string (UTF8) = 6;\n" +
+        "  required binary string (STRING) = 6;\n" +
         "  required int32 i=1;\n" +
         "  required binary s2= 3;\n" +
         "  required binary s3 =4;\n" +
@@ -165,7 +165,7 @@ public void testMAPAnnotations() {
         "message Message {\n" +
         "  optional group aMap (MAP) {\n" +
         "    repeated group map (MAP_KEY_VALUE) {\n" +
-        "      required binary key (UTF8);\n" +
+        "      required binary key (STRING);\n" +
         "      required int32 value;\n" +
         "    }\n" +
         "  }\n" +
@@ -192,7 +192,7 @@ public void testLISTAnnotation() {
     String message =
         "message Message {\n" +
         "  required group aList (LIST) {\n" +
-        "    repeated binary string (UTF8);\n" +
+        "    repeated binary string (STRING);\n" +
         "  }\n" +
         "}\n";
 
@@ -304,14 +304,14 @@ public void testIntAnnotations() {
   @Test
   public void testIntegerAnnotations() {
     String message = "message IntMessage {" +
-      "  required int32 i8 (INT(8,true));" +
-      "  required int32 i16 (INT(16,true));" +
-      "  required int32 i32 (INT(32,true));" +
-      "  required int64 i64 (INT(64,true));" +
-      "  required int32 u8 (INT(8,false));" +
-      "  required int32 u16 (INT(16,false));" +
-      "  required int32 u32 (INT(32,false));" +
-      "  required int64 u64 (INT(64,false));" +
+      "  required int32 i8 (INTEGER(8,true));" +
+      "  required int32 i16 (INTEGER(16,true));" +
+      "  required int32 i32 (INTEGER(32,true));" +
+      "  required int64 i64 (INTEGER(64,true));" +
+      "  required int32 u8 (INTEGER(8,false));" +
+      "  required int32 u16 (INTEGER(16,false));" +
+      "  required int32 u32 (INTEGER(32,false));" +
+      "  required int64 u64 (INTEGER(64,false));" +
       "}\n";
 
     MessageType parsed = MessageTypeParser.parseMessageType(message);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Logical type names in parquet-mr are not consistent with parquet-format
> -----------------------------------------------------------------------
>
>                 Key: PARQUET-1335
>                 URL: https://issues.apache.org/jira/browse/PARQUET-1335
>             Project: Parquet
>          Issue Type: Improvement
>          Components: parquet-mr
>    Affects Versions: 1.11.0
>            Reporter: Nandor Kollar
>            Assignee: Nandor Kollar
>            Priority: Minor
>              Labels: pull-request-available
>
> UTF8 logical type should be called STRING, INT should be called INTEGER.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to