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:57:00 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17443483#comment-17443483 ]
Vitalii Diravka commented on DRILL-1824:
----------------------------------------
[~jnadeau] is right DRILL-1896 is mixed with this Jira. This one is resolved:
{code:java}
apache drill> select * from dfs.home.`/vector/complex/writer/schemaChange`;
+------+---------------+
| a | b |
+------+---------------+
| foo | null |
| bar | null |
| foo2 | {} |
| bar2 | {"x":1,"y":2} |
+------+---------------+
4 rows selected (0.195 seconds) {code}
But DRILL-1896 is not resolved and causes _TestJsonReader#schemaChangeValidate_ to fail.
> 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 & Test
> Affects Versions: 0.7.0
> Reporter: Jacques Nadeau
> Priority: Minor
> Fix For: Future
>
>
> 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)