-
Notifications
You must be signed in to change notification settings - Fork 1.5k
PARQUET-677: Quoted identifiers in column names. #361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -200,4 +200,16 @@ public void testIDs() throws Exception { | |
| assertEquals(schema, schema2); | ||
| assertEquals(schema.toString(), schema2.toString()); | ||
| } | ||
|
|
||
| @Test | ||
| public void testQuotedIdentifiers() throws Exception { | ||
| MessageType schema = new MessageType("test", | ||
| new PrimitiveType(REQUIRED, BINARY, "foo bar"), | ||
| new PrimitiveType(REQUIRED, BINARY, "foo()`bar"), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to support ` in names? Is it supported elsewhere, like in Hive? It doesn't seem worth the added complexity in the tokenizer to me.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it is supported in Hive. https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL Have a look at the |
||
| new PrimitiveType(REQUIRED, BINARY, "foo@#$%^bar") | ||
| ); | ||
| MessageType schema2 = MessageTypeParser.parseMessageType(schema.toString()); | ||
| assertEquals(schema, schema2); | ||
| assertEquals(schema.toString(), schema2.toString()); | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should add checks that column names that worked before do not get quoted when generating the schema now.
Otherwise older versions of parquet won't be able to read those files.