[jira] [Updated] (AVRO-3847) Record field doesn't accept default value if field type is union and the type of default value is pre-defined name

2023-08-26 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/AVRO-3847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated AVRO-3847:
-
Labels: pull-request-available  (was: )

> Record field doesn't accept default value if field type is union and the type 
> of default value is pre-defined name
> --
>
> Key: AVRO-3847
> URL: https://issues.apache.org/jira/browse/AVRO-3847
> Project: Apache Avro
>  Issue Type: Bug
>  Components: rust
>Affects Versions: 1.12.0
>Reporter: Kousuke Saruta
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Given we have a schema like as follows.
> {code}
> {
> "name": "record1",
> "type": "record",
> "fields": [
> {
> "name": "f1",
> "type": {
> "name": "record2",
> "type": "record",
> "fields": [
> {
> "name": "f1_1",
> "type": "int"
> }
> ]
> }
> },  {
> "name": "f2",
> "type": ["record2", "int"],
> "default": {
> "f1_1": 100
> }
> }
> ]
> }
> {code}
> The type of the field f2 is union of record2 and int, and the default value 
> is of a value of record2, which is pre-defined.
> Current Rust binding doesn't accept such schemas, raising a error message 
> like as follows.
> {code}
> Error: One union type Ref must match the `default`'s value type Map
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (AVRO-3847) Record field doesn't accept default value if field type is union and the type of default value is pre-defined name

2023-08-26 Thread Kousuke Saruta (Jira)


 [ 
https://issues.apache.org/jira/browse/AVRO-3847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kousuke Saruta updated AVRO-3847:
-
Affects Version/s: 1.12.0

> Record field doesn't accept default value if field type is union and the type 
> of default value is pre-defined name
> --
>
> Key: AVRO-3847
> URL: https://issues.apache.org/jira/browse/AVRO-3847
> Project: Apache Avro
>  Issue Type: Bug
>  Components: rust
>Affects Versions: 1.12.0
>Reporter: Kousuke Saruta
>Priority: Major
>
> Given we have a schema like as follows.
> {code}
> {
> "name": "record1",
> "type": "record",
> "fields": [
> {
> "name": "f1",
> "type": {
> "name": "record2",
> "type": "record",
> "fields": [
> {
> "name": "f1_1",
> "type": "int"
> }
> ]
> }
> },  {
> "name": "f2",
> "type": ["record2", "int"],
> "default": {
> "f1_1": 100
> }
> }
> ]
> }
> {code}
> The type of the field f2 is union of record2 and int, and the default value 
> is of a value of record2, which is pre-defined.
> Current Rust binding doesn't accept such schemas, raising a error message 
> like as follows.
> {code}
> Error: One union type Ref must match the `default`'s value type Map
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [avro] rulle-io commented on pull request #2121: AVRO-3845: avro-tools: Add log entry when an external schema is used

2023-08-26 Thread via GitHub


rulle-io commented on PR #2121:
URL: https://github.com/apache/avro/pull/2121#issuecomment-1694338796

   Tested manully:
   
   ### --schema-file
   ```
   avro-tools fromjson --schema-file example.avro example.json
   ...
   23/08/26 14:46:15 INFO tool.DataFileReadTool: Reading schema from file 
'example.avro'
   ```
   
   ### --schema
   ```
   avro-tools fromjson --schema 
{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":"int"},{"name":"favorite_color","type":"string"}]}
 example.avro
   ...
   23/08/26 15:04:33 INFO tool.DataFileReadTool: Reading schema from string 
'{namespace:example.avro,type:record,name:User,fields:[{name:name,type:string},{name:favorite_number,type:int},{name:favorite_color,type:string}]}'
   ```
   


-- 
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: issues-unsubscr...@avro.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Updated] (AVRO-3846) Race condition can happen among serde tests

2023-08-26 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/AVRO-3846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated AVRO-3846:
-
Labels: pull-request-available  (was: )

> Race condition can happen among serde tests
> ---
>
> Key: AVRO-3846
> URL: https://issues.apache.org/jira/browse/AVRO-3846
> Project: Apache Avro
>  Issue Type: Bug
>  Components: rust
>Affects Versions: 1.12.0
>Reporter: Kousuke Saruta
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Sometimes one of tests named avro_3747* fails.
> You can easily reproduce this issue by cargo test avro_3747.
> These tests are run concurrently by Cargo test and those tests load/store the 
> same atomic variable so This seems race condition



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (AVRO-3846) Race condition can happen among serde tests

2023-08-26 Thread Kousuke Saruta (Jira)


 [ 
https://issues.apache.org/jira/browse/AVRO-3846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kousuke Saruta updated AVRO-3846:
-
Description: 
Sometimes one of tests named avro_3747* fails.
You can easily reproduce this issue by cargo test avro_3747.
These tests are run concurrently by Cargo test and those tests load/store the 
same atomic variable so This seems race condition

  was:
Sometimes one of tests named avro_3747 fails.
You can easily reproduce this issue by cargo test avro_3747.
These tests are run concurrently by Cargo test and those tests load/store the 
same atomic variable so This seems race condition


> Race condition can happen among serde tests
> ---
>
> Key: AVRO-3846
> URL: https://issues.apache.org/jira/browse/AVRO-3846
> Project: Apache Avro
>  Issue Type: Bug
>  Components: rust
>Affects Versions: 1.12.0
>Reporter: Kousuke Saruta
>Priority: Major
>
> Sometimes one of tests named avro_3747* fails.
> You can easily reproduce this issue by cargo test avro_3747.
> These tests are run concurrently by Cargo test and those tests load/store the 
> same atomic variable so This seems race condition



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (AVRO-3846) Race condition can happen among serde tests

2023-08-26 Thread Kousuke Saruta (Jira)


 [ 
https://issues.apache.org/jira/browse/AVRO-3846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kousuke Saruta updated AVRO-3846:
-
Description: 
Sometimes one of tests named avro_3747 fails.
You can easily reproduce this issue by cargo test avro_3747.
These tests are run concurrently by Cargo test and those tests load/store the 
same atomic variable so This seems race condition

  was:
Sometimes one of tests named avro_3747 fails.
These tests are run concurrently by Cargo test and those tests load/store the 
same atomic variable so This seems race condition


> Race condition can happen among serde tests
> ---
>
> Key: AVRO-3846
> URL: https://issues.apache.org/jira/browse/AVRO-3846
> Project: Apache Avro
>  Issue Type: Bug
>  Components: rust
>Affects Versions: 1.12.0
>Reporter: Kousuke Saruta
>Priority: Major
>
> Sometimes one of tests named avro_3747 fails.
> You can easily reproduce this issue by cargo test avro_3747.
> These tests are run concurrently by Cargo test and those tests load/store the 
> same atomic variable so This seems race condition



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (AVRO-3845) Add loggging when avro-tools fromjson with --schema-file|--schema is used

2023-08-26 Thread Ruslan Altynnikov (Jira)


 [ 
https://issues.apache.org/jira/browse/AVRO-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ruslan Altynnikov updated AVRO-3845:

Description: Add log entries when {{avro-tools fromjson}} parameter 
{{--schema-file}} or {{-schema}} is used, there is no logging produced and it 
is unclear whether the tool actually picked up the provided schema.  (was: Add 
log entries when {{avro-tools fromjson}} parameter {{--schema-file}} or 
{{--schema}} is used, there is no logging produced and it is unclear whether 
the tool actually picked up the provided schema.)

> Add loggging when avro-tools fromjson with --schema-file|--schema is used
> -
>
> Key: AVRO-3845
> URL: https://issues.apache.org/jira/browse/AVRO-3845
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: java
>Reporter: Ruslan Altynnikov
>Priority: Trivial
>
> Add log entries when {{avro-tools fromjson}} parameter {{--schema-file}} or 
> {{-schema}} is used, there is no logging produced and it is unclear whether 
> the tool actually picked up the provided schema.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (AVRO-3845) Add loggging when avro-tools fromjson with --schema-file|--schema is used

2023-08-26 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/AVRO-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated AVRO-3845:
-
Labels: pull-request-available  (was: )

> Add loggging when avro-tools fromjson with --schema-file|--schema is used
> -
>
> Key: AVRO-3845
> URL: https://issues.apache.org/jira/browse/AVRO-3845
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: java
>Reporter: Ruslan Altynnikov
>Priority: Trivial
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Add log entries when {{avro-tools fromjson}} parameter {{--schema-file}} or 
> {{-schema}} is used, there is no logging produced and it is unclear whether 
> the tool actually picked up the provided schema.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (AVRO-3845) Add loggging when avro-tools fromjson with --schema-file|--schema is used

2023-08-26 Thread Ruslan Altynnikov (Jira)


 [ 
https://issues.apache.org/jira/browse/AVRO-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ruslan Altynnikov updated AVRO-3845:

Description: Add log entries when {{avro-tools fromjson}} parameter 
{{--schema-file}} or {{--schema}} is used, there is no logging produced and it 
is unclear whether the tool actually picked up the provided schema.  (was: Add 
log entries when {color:#46473b}{{{color}avro-tools fromjson}} parameter 
{color:#46473b}{{{color}--schema-file}} or {color:#46473b}{{{color}--schema}} 
is used, there is no logging produced and it is unclear whether the tool 
actually picked up the provided schema.)

> Add loggging when avro-tools fromjson with --schema-file|--schema is used
> -
>
> Key: AVRO-3845
> URL: https://issues.apache.org/jira/browse/AVRO-3845
> Project: Apache Avro
>  Issue Type: Improvement
>  Components: java
>Reporter: Ruslan Altynnikov
>Priority: Trivial
>
> Add log entries when {{avro-tools fromjson}} parameter {{--schema-file}} or 
> {{--schema}} is used, there is no logging produced and it is unclear whether 
> the tool actually picked up the provided schema.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)