[
https://issues.apache.org/jira/browse/AVRO-3532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17628938#comment-17628938
]
Christophe Le Saec commented on AVRO-3532:
------------------------------------------
As corresponding [PR for C#|https://github.com/apache/avro/pull/1866] has been
merged and there is no issue that prevent us to formalize the coded Java rules
for names ; can we do same with others PR ? ([~rskraba], [~mgrigorov]) ?
For Java & Rust : [https://github.com/apache/avro/pull/1787] (Java part
contains only unit test)
For C : [https://github.com/apache/avro/pull/1798]
(then, i will do ASAP same code for C++, i will need help for others, Python,
Php ...)
> Align naming rules on code
> --------------------------
>
> Key: AVRO-3532
> URL: https://issues.apache.org/jira/browse/AVRO-3532
> Project: Apache Avro
> Issue Type: Wish
> Reporter: Christophe Le Saec
> Priority: Major
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Description of [naming rule on
> documentation|https://avro.apache.org/docs/1.11.1/specification/#names] is
> {noformat}
> - start with [A-Za-z_]
> - subsequently contain only [A-Za-z0-9_]
> {noformat}
> But [java
> code|https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/Schema.java#L1578]
> use Character.isLetter method
> {code:java}
> char first = name.charAt(0);
> if (!(Character.isLetter(first) || first == '_'))
> throw new SchemaParseException("Illegal initial character: " + name);
> for (int i = 1; i < length; i++) {
> char c = name.charAt(i);
> if (!(Character.isLetterOrDigit(c) || c == '_'))
> throw new SchemaParseException("Illegal character in: " + name);
> }
> return name;
> {code}
> This method accept accent éùàçË ... and also chinese character (我) ...
> Object of this JIRA is to update names rules in documentation to include what
> java already accept.
> C# also accept this kind of name ([See this
> PR|https://github.com/apache/avro/pull/1866])
> Rust & C need updates (others PR)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)