[GitHub] [avro] sarutak opened a new pull request, #2433: AVRO-3827: [Rust] Disallow duplicate field names
sarutak opened a new pull request, #2433: URL: https://github.com/apache/avro/pull/2433 AVRO-3827 ## What is the purpose of the change This PR aims to fix an issue that the current Rust binding accepts duplicate field names. If a schema contains a record and some of its fields have the same field name, such schema should not be allowed. ``` { "name": "my_schema", "type": "record", "fields": [ { "name": "f1", "type": { "name": "a", "type": "record", "fields": [] } }, { "name": "f1", "type": { "name": "b", "type": "record", "fields": [] } } ] } ``` ## Verifying this change Added new test and passed with `cargo test avro_3827`. This change added tests and can be verified as follows: *(example:)* - *Extended interop tests to verify consistent valid schema names between SDKs* - *Added test that validates that Java throws an AvroRuntimeException on invalid binary data* - *Manually verified the change by building the website and checking the new redirect* ## Documentation No new features added. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@avro.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Created] (AVRO-3827) Disallow duplicate field names
Kousuke Saruta created AVRO-3827: Summary: Disallow duplicate field names Key: AVRO-3827 URL: https://issues.apache.org/jira/browse/AVRO-3827 Project: Apache Avro Issue Type: Bug Components: rust Affects Versions: 1.12.0 Reporter: Kousuke Saruta If a schema contains a record and some of its fields have the same field name, such schema should not be allowed. {code} { "name": "my_schema", "type": "record", "fields": [ { "name": "f1", "type": { "name": "a", "type": "record", "fields": [] } } { "name": "f1", "type": { "name": "b", "type": "record", "fields": [] } } ] } {code} But the current Rust binding accept. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [avro] RyanSkraba opened a new pull request, #2432: AVRO-3819: Centralize system properties that limit allocations
RyanSkraba opened a new pull request, #2432: URL: https://github.com/apache/avro/pull/2432 ## What is the purpose of the change As described in AVRO-3819, the system properties, exception types and messages dealing with the limits when allocating strings, bytes and collections are distributed throughout the code: `BinaryDecoder`, `Utf8`, `ByteReader` all have similar logic and checks. These have been centralised as helper methods in one location and a new exception: `SystemLimitException` extending `AvroRuntimeException`. In addition, these checks were applied to the collection sizes in BinaryDecoder (allocating arrays and maps), as well as applied to the `FIXED` type schema. When dealing with untrusted or corrupt data, these checks ensure that an exception is thrown and can be gracefully handled, as opposed to an `OutOfMemoryError`. ## Verifying this change This change added tests, especially in the `TestBinaryDecoder` covering these scenarios. ## Documentation - Does this pull request introduce a new feature? **no** - If yes, how is the feature documented? **JavaDocs** -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@avro.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Specification of namespaces
Hi developers, I'd like to discuss the specification of namespace. According to the specification, each dot separated portion of a namespace should be [a-zA-Z_]][a-zA-Z0-9_]*. https://avro.apache.org/docs/1.11.1/specification/#names But the actual implementations of some language bindings don't follow the specification, and accept any characters. Especially, the Java binding generates namespaces which contain "$" for inner classes generated by protobuf. So, should we need to review the namespace specification? Thanks, Kousuke
[GitHub] [avro] clesaec opened a new pull request, #2431: AVRO-3826: Common tests for C++ module
clesaec opened a new pull request, #2431: URL: https://github.com/apache/avro/pull/2431 ## What is the purpose of the change this ticket [AVRO-3591](https://issues.apache.org/jira/browse/AVRO-3591) aims to have common test suite for differents modules. This PR complete it with task [AVRO-3826](https://issues.apache.org/jira/browse/AVRO-3826) for C++ module (currently, it exists for Java, Rust and C). ## Verifying this change As this PR only add a unit test to C++ module, the only thing to do is "./build.sh test" command at this module. ## Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (not applicable) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@avro.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Created] (AVRO-3826) Commons test for C++ module
Christophe Le Saec created AVRO-3826: Summary: Commons test for C++ module Key: AVRO-3826 URL: https://issues.apache.org/jira/browse/AVRO-3826 Project: Apache Avro Issue Type: Sub-task Reporter: Christophe Le Saec Assignee: Christophe Le Saec -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [avro] sarutak opened a new pull request, #2430: AVRO-3825: [Java] Disallow invalid namespaces
sarutak opened a new pull request, #2430: URL: https://github.com/apache/avro/pull/2430 ## What is the purpose of the change According to the specification, each portion of a namespace separated by dot should be `[a-z,A-Z,_][a-z,A-Z,0-9_]`. https://avro.apache.org/docs/1.11.1/specification/#names ``` The name portion of the fullname of named types, record field names, and enum symbols must: start with [A-Za-z_] subsequently contain only [A-Za-z0-9_] A namespace is a dot-separated sequence of such names. The empty string may also be used as a namespace to indicate the null namespace. Equality of names (including field names and enum symbols) as well as fullnames is case-sensitive. The null namespace may not be used in a dot-separated sequence of names. So the grammar for a namespace is: | [()*] ``` But the current Java binding accept invalid namespaces. This PR aims to fix this issue. ## Verifying this change Added new test and it passed on my laptop. ## Documentation No new features added. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@avro.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Created] (AVRO-3825) Disallow invalid namespace
Kousuke Saruta created AVRO-3825: Summary: Disallow invalid namespace Key: AVRO-3825 URL: https://issues.apache.org/jira/browse/AVRO-3825 Project: Apache Avro Issue Type: Bug Components: java Affects Versions: 1.12.0 Reporter: Kousuke Saruta According to the specification, each portion of a namespace separated by dot should be [a-z,A-Z,_][a-z,A-Z,0-9_]. [https://avro.apache.org/docs/1.11.1/specification/#names] {code:java} The name portion of the fullname of named types, record field names, and enum symbols must: start with [A-Za-z_] subsequently contain only [A-Za-z0-9_] A namespace is a dot-separated sequence of such names. The empty string may also be used as a namespace to indicate the null namespace. Equality of names (including field names and enum symbols) as well as fullnames is case-sensitive. The null namespace may not be used in a dot-separated sequence of names. So the grammar for a namespace is: | [()*] {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [avro] martin-g merged pull request #2425: Bump strum_macros from 0.25.1 to 0.25.2 in /lang/rust
martin-g merged PR #2425: URL: https://github.com/apache/avro/pull/2425 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@avro.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [avro] martin-g merged pull request #2426: Bump regex from 1.9.1 to 1.9.3 in /lang/rust
martin-g merged PR #2426: URL: https://github.com/apache/avro/pull/2426 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@avro.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [avro] martin-g merged pull request #2429: Minor: [Python] Usage of build.sh should mention about `doc`
martin-g merged PR #2429: URL: https://github.com/apache/avro/pull/2429 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@avro.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [avro] martin-g merged pull request #2428: Bump zerocopy from 0.6.1 to 0.6.3 in /lang/rust
martin-g merged PR #2428: URL: https://github.com/apache/avro/pull/2428 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@avro.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org