You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2021/02/03 16:05:00 UTC

[jira] [Created] (ARROW-11483) [Java][C++][Integration] C++ integration test creates JSON files incompatible with Java

Antoine Pitrou created ARROW-11483:
--------------------------------------

             Summary: [Java][C++][Integration] C++ integration test creates JSON files incompatible with Java
                 Key: ARROW-11483
                 URL: https://issues.apache.org/jira/browse/ARROW-11483
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++, Integration, Java
            Reporter: Antoine Pitrou


The C++ {{arrow-json-integration-test}} runner always emits an empty {{children}} array for non-nested fields, but the Java JSON reader for some reason uses an inflexible tokenize-based parsing technique and refuses such files:
https://github.com/apache/arrow/blob/master/java/vector/src/main/java/org/apache/arrow/vector/ipc/JsonFileReader.java#L722-L740

Typically the error message is as follows:
{code}
Incompatible files
Expected END_OBJECT but got FIELD_NAME
16:30:12.557 [main] ERROR org.apache.arrow.tools.Integration - Incompatible files
java.lang.IllegalStateException: Expected END_OBJECT but got FIELD_NAME
	at org.apache.arrow.vector.ipc.JsonFileReader.readToken(JsonFileReader.java:779)
	at org.apache.arrow.vector.ipc.JsonFileReader.readFromJsonIntoVector(JsonFileReader.java:740)
	at org.apache.arrow.vector.ipc.JsonFileReader.read(JsonFileReader.java:219)
	at org.apache.arrow.tools.Integration$Command$3.execute(Integration.java:203)
	at org.apache.arrow.tools.Integration.run(Integration.java:118)
	at org.apache.arrow.tools.Integration.main(Integration.java:69)
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)