Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected LogicalTypeAnnotation fromString(List<String> params) {
return listType();
}
},
UTF8 {
STRING {
@Override
protected LogicalTypeAnnotation fromString(List<String> params) {
return stringType();
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -273,7 +273,7 @@ public void accept(LogicalTypeAnnotationVisitor logicalTypeAnnotationVisitor) {

@Override
LogicalTypeToken getType() {
return LogicalTypeToken.UTF8;
return LogicalTypeToken.STRING;
}

@Override
Expand Down Expand Up @@ -646,7 +646,7 @@ public void accept(LogicalTypeAnnotationVisitor logicalTypeAnnotationVisitor) {

@Override
LogicalTypeToken getType() {
return LogicalTypeToken.INT;
return LogicalTypeToken.INTEGER;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" +
Expand Down Expand Up @@ -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" +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this test change needed?

"}\n";

MessageType parsed = parseMessageType(message);
Expand All @@ -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" +
Expand All @@ -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" +
Expand All @@ -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";

Expand Down Expand Up @@ -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);
Expand Down