vibhatha commented on code in PR #43014:
URL: https://github.com/apache/arrow/pull/43014#discussion_r1687809065
##########
java/c/src/test/java/org/apache/arrow/c/StreamTest.java:
##########
Review Comment:
Looking into this, Java uses, the `Integration.java` program to do this
validation as used by the archery. And in the program there is a schema
comparison, just by using the content in the generated JSON files and arrow
files. So this anyways should fail right? Because the JSON file generated has
one schema, and the IPC file has another schema as the loaded data doesn't
contain the canonical names in C++?
**JSON Schema**
```json
"schema": {
"fields": [
{
"name": "map_other_names",
"type": {
"name": "map",
"keysSorted": false
},
"nullable": true,
"children": [
{
"name": "some_entries",
"type": {
"name": "struct"
},
"nullable": false,
"children": [
{
"name": "some_key",
"type": {
"name": "utf8"
},
"nullable": false,
"children": []
},
{
"name": "some_value",
"type": {
"name": "int",
"isSigned": true,
"bitWidth": 32
},
"nullable": true,
"children": []
}
]
}
]
}
]
},
```
**IPC Content**
```bash
>>> import pyarrow as pa
>>> file_path =
"/tmp/tmppa0h4f3m/7a269ab8_generated_map_non_canonical.consumer_stream_as_file"
>>> with pa.OSFile(file_path, 'rb') as source:
... loaded_array = pa.ipc.open_file(source).read_all()
...
>>> loaded_array
pyarrow.Table
map_other_names: map<string, int32>
child 0, entries: struct<key: string not null, value: int32> not null
child 0, key: string not null
child 1, value: int32
----
map_other_names:
[[keys:["mw3gônj"]values:[null],null,keys:["矢gc6h43","4n矢3°5€"]values:[2147483647,-99106826],keys:["or3iµg£","naadofp","°dfhjrl","hôr£µn£"]values:[1403778175,401427101,null,1171070133],keys:["i2nk4oô"]values:[1754612069],keys:["wiôgid6","dÂom23r"]values:[1528772736,-696511786],keys:["rdÂ3n1r","wµrôÂfc","kfakmko","°2Â3hÂ"]values:[null,1836582554,-1502317905,153924375]]]
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]