You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Vitalii Diravka (Jira)" <ji...@apache.org> on 2021/11/14 22:58:00 UTC

[jira] [Resolved] (DRILL-1824) Certain JSON data test patterns cause false negatives in new test framework

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

Vitalii Diravka resolved DRILL-1824.
------------------------------------
    Fix Version/s: 1.19.0
                       (was: Future)
       Resolution: Done

> Certain JSON data test patterns cause false negatives in new test framework
> ---------------------------------------------------------------------------
>
>                 Key: DRILL-1824
>                 URL: https://issues.apache.org/jira/browse/DRILL-1824
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Tools, Build &amp; Test
>    Affects Versions: 0.7.0
>            Reporter: Jacques Nadeau
>            Assignee: Vitalii Diravka
>            Priority: Minor
>             Fix For: 1.19.0
>
>
> Testing the json reader.  
> {code}
>     testBuilder() //
>       .sqlQuery("select b from files") //
>       .unOrdered() //
>       .jsonBaselineFile("expected.json") //
>       .build()
>       .run();
> {code}
> Files composed of two files:
> File 1
> {code}
> {"a": "foo","b": null}
> {"a": "bar","b": null}
> {code}
> File 2
> {code}
> {"a": "foo2","b": null}
> {"a": "bar2","b": {"x":1, "y":2}}
> {code}
> Expected Output:
> {code}
> b
> null
> null
> {}
> {"x":1,"y":2}
> {code}
> Receives failure of 
> {code}
> 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)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)