[jira] [Commented] (AVRO-1924) Variable named 'date' in IDL
[ https://issues.apache.org/jira/browse/AVRO-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16727042#comment-16727042 ] Martin Jubelgas commented on AVRO-1924: --- To avoid problems and collisions with reserved words, names can be escaped like {code:java} @namespace("org.apache.parquet.avro") protocol Cars { record Service { long `date`; } } {code} If names are automatically converted and a collision cannot be ruled out, they should be escaped by default, so no problems should arise. I think this ticket should hence be closed. > Variable named 'date' in IDL > > > Key: AVRO-1924 > URL: https://issues.apache.org/jira/browse/AVRO-1924 > Project: Apache Avro > Issue Type: Bug >Affects Versions: 1.8.1 >Reporter: Niels Basjes >Assignee: Ryan Blue >Priority: Critical > > I was compiling Apache Parquet and found that the switch from Avro 1.8.0 to > 1.8.1 broke their build. > The error: {code} > [ERROR] Failed to execute goal > org.apache.avro:avro-maven-plugin:1.8.1:idl-protocol (schemas) ... > org.apache.avro.compiler.idl.ParseException: Encountered " "date" "date "" at > line 23, column 14. > [ERROR] Was expecting one of: > [ERROR] ... > [ERROR] "@" ... > [ERROR] "`" ... > [ERROR] -> [Help 1] > {code} > As it turns out they have a test idl that contains this: > {code} > @namespace("org.apache.parquet.avro") > protocol Cars { > record Service { > long date; > } > } > {code} > And this change AVRO-1684 turned the word 'date' into something different for > the idl compiler. > So changing the word 'date' into something else fixes the problem. > Yet I think this is an undesirable effect for end user applications. > [~rdblue]: I assigned this to you implemented the mentioned change. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (AVRO-1924) Variable named 'date' in IDL
[ https://issues.apache.org/jira/browse/AVRO-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15636378#comment-15636378 ] Zoltan Ivanfi commented on AVRO-1924: - Please note that although it may be easy to work around this issue in Parquet, it can happen in production systems as well, where people may use the name `date` for some fields and have massive amounts of data and code built around this. > Variable named 'date' in IDL > > > Key: AVRO-1924 > URL: https://issues.apache.org/jira/browse/AVRO-1924 > Project: Avro > Issue Type: Bug >Reporter: Niels Basjes >Assignee: Ryan Blue > > I was compiling Apache Parquet and found that the switch from Avro 1.8.0 to > 1.8.1 broke their build. > The error: {code} > [ERROR] Failed to execute goal > org.apache.avro:avro-maven-plugin:1.8.1:idl-protocol (schemas) ... > org.apache.avro.compiler.idl.ParseException: Encountered " "date" "date "" at > line 23, column 14. > [ERROR] Was expecting one of: > [ERROR] ... > [ERROR] "@" ... > [ERROR] "`" ... > [ERROR] -> [Help 1] > {code} > As it turns out they have a test idl that contains this: > {code} > @namespace("org.apache.parquet.avro") > protocol Cars { > record Service { > long date; > } > } > {code} > And this change AVRO-1684 turned the word 'date' into something different for > the idl compiler. > So changing the word 'date' into something else fixes the problem. > Yet I think this is an undesirable effect for end user applications. > [~rdblue]: I assigned this to you implemented the mentioned change. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (AVRO-1924) Variable named 'date' in IDL
[ https://issues.apache.org/jira/browse/AVRO-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15579458#comment-15579458 ] Niels Basjes commented on AVRO-1924: Depending how hard this is we may opt for mentioning this in the release note in combination with the fact you can escape an identifier name. In Parquet this is not a problem as this is a schema that is only used in unit tests. > Variable named 'date' in IDL > > > Key: AVRO-1924 > URL: https://issues.apache.org/jira/browse/AVRO-1924 > Project: Avro > Issue Type: Bug >Reporter: Niels Basjes >Assignee: Ryan Blue > > I was compiling Apache Parquet and found that the switch from Avro 1.8.0 to > 1.8.1 broke their build. > The error: {code} > [ERROR] Failed to execute goal > org.apache.avro:avro-maven-plugin:1.8.1:idl-protocol (schemas) ... > org.apache.avro.compiler.idl.ParseException: Encountered " "date" "date "" at > line 23, column 14. > [ERROR] Was expecting one of: > [ERROR] ... > [ERROR] "@" ... > [ERROR] "`" ... > [ERROR] -> [Help 1] > {code} > As it turns out they have a test idl that contains this: > {code} > @namespace("org.apache.parquet.avro") > protocol Cars { > record Service { > long date; > } > } > {code} > And this change AVRO-1684 turned the word 'date' into something different for > the idl compiler. > So changing the word 'date' into something else fixes the problem. > Yet I think this is an undesirable effect for end user applications. > [~rdblue]: I assigned this to you implemented the mentioned change. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (AVRO-1924) Variable named 'date' in IDL
[ https://issues.apache.org/jira/browse/AVRO-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15522551#comment-15522551 ] Niels Basjes commented on AVRO-1924: Although uncommon I essentially think this should be valid: {code:java|title=share/test/schemas/specialtypes.avdl } record keywordsAsVariableNames { string array; string boolean; string double; string enum; string error; string false; string fixed; string float; string idl; string import; string int; string long; string map; string oneway; string bytes; string schema; string string; string null; string protocol; string record; string throws; string true; string union; string void; string date; string time_ms; string timestamp_ms; string decimal; } {code} Is this desirable? Is this doable in the JavaCC ? Is this doable in the other languages? > Variable named 'date' in IDL > > > Key: AVRO-1924 > URL: https://issues.apache.org/jira/browse/AVRO-1924 > Project: Avro > Issue Type: Bug >Reporter: Niels Basjes >Assignee: Ryan Blue > > I was compiling Apache Parquet and found that the switch from Avro 1.8.0 to > 1.8.1 broke their build. > The error: {code} > [ERROR] Failed to execute goal > org.apache.avro:avro-maven-plugin:1.8.1:idl-protocol (schemas) ... > org.apache.avro.compiler.idl.ParseException: Encountered " "date" "date "" at > line 23, column 14. > [ERROR] Was expecting one of: > [ERROR] ... > [ERROR] "@" ... > [ERROR] "`" ... > [ERROR] -> [Help 1] > {code} > As it turns out they have a test idl that contains this: > {code} > @namespace("org.apache.parquet.avro") > protocol Cars { > record Service { > long date; > } > } > {code} > And this change AVRO-1684 turned the word 'date' into something different for > the idl compiler. > So changing the word 'date' into something else fixes the problem. > Yet I think this is an undesirable effect for end user applications. > [~rdblue]: I assigned this to you implemented the mentioned change. -- This message was sent by Atlassian JIRA (v6.3.4#6332)