Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-11483

[Java][C++][Integration] C++ integration test creates JSON files incompatible with Java

Details

    Description

      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:

      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)
      

      Attachments

        Issue Links

          Activity

            People

              apitrou Antoine Pitrou
              apitrou Antoine Pitrou
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m

                  Slack

                    Issue deployment