Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-1824

Certain JSON data test patterns cause false negatives in new test framework

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Done
    • 0.7.0
    • 1.19.0
    • Tools, Build & Test
    • None

    Description

      Testing the json reader.

          testBuilder() //
            .sqlQuery("select b from files") //
            .unOrdered() //
            .jsonBaselineFile("expected.json") //
            .build()
            .run();
      

      Files composed of two files:

      File 1

      {"a": "foo","b": null}
      {"a": "bar","b": null}
      

      File 2

      {"a": "foo2","b": null}
      {"a": "bar2","b": {"x":1, "y":2}}
      

      Expected Output:

      b
      null
      null
      {}
      {"x":1,"y":2}
      

      Receives failure of

      java.lang.Exception: Did not find expected record in result set: `b` : null, 
      
      	at org.apache.drill.DrillTestWrapper.compareResults(DrillTestWrapper.java:528)
      	at org.apache.drill.DrillTestWrapper.compareUnorderedResults(DrillTestWrapper.java:290)
      	at org.apache.drill.DrillTestWrapper.run(DrillTestWrapper.java:118)
      	at org.apache.drill.exec.vector.complex.writer.TestJsonReader.schemaChange(TestJsonReader.java:60)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      
      

      Attachments

        Issue Links

          Activity

            People

              vitalii Vitalii Diravka
              jnadeau Jacques Nadeau
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: