[
https://issues.apache.org/jira/browse/ORC-524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16927733#comment-16927733
]
Sandeep More commented on ORC-524:
----------------------------------
While working on this I ran into few issues, I'll document them here:
# We cannot compare the output of expected files with the output from
PrintData class. There are minor issue such as spacing and formatting that
prevent 1:1 comparison. To get around this issue I am iterating through the
rows and comparing them by stripping whitespaces.
# The next issue I running into is the "key":"value" format that java uses
("_key" and "_value") this isĀ causing issues when maps are being compared.
This is the [code where this is
done.|https://github.com/apache/orc/blob/a621181684b3db0311086fd777f99f88813e28a0/java/bench/core/src/java/org/apache/orc/bench/core/convert/json/JsonWriter.java#L75]
e.g. of #2
{code:java}
Expected:
{"boolean1":true,"byte1":100,"short1":2048,"int1":65536,"long1":9223372036854775807,"float1":2,"double1":-5,"bytes1":[],"string1":"bye","middle":{"list":[{"int1":1,"string1":"bye"},{"int1":2,"string1":"sigh"}]},"list":[{"int1":100000000,"string1":"cat"},{"int1":-100000,"string1":"in"},{"int1":1234,"string1":"hat"}],"map":[{"key":"chani","value":{"int1":5,"string1":"chani"}},{"key":"mauddib","value":{"int1":1,"string1":"mauddib"}}]}
Actual:
{"boolean1":true,"byte1":100,"short1":2048,"int1":65536,"long1":9223372036854775807,"float1":2,"double1":-5,"bytes1":[],"string1":"bye","middle":{"list":[{"int1":1,"string1":"bye"},{"int1":2,"string1":"sigh"}]},"list":[{"int1":100000000,"string1":"cat"},{"int1":-100000,"string1":"in"},{"int1":1234,"string1":"hat"}],"map":[{"_key":"chani","_value":{"int1":5,"string1":"chani"}},{"_key":"mauddib","_value":{"int1":1,"string1":"mauddib"}}]}
{code}
[~owen.omalley] any thoughts ?
> Java reader should read test orc files in example dir. and compare it with
> expected dir.
> ----------------------------------------------------------------------------------------
>
> Key: ORC-524
> URL: https://issues.apache.org/jira/browse/ORC-524
> Project: ORC
> Issue Type: Bug
> Components: Java, Reader
> Reporter: Sandeep More
> Assignee: Sandeep More
> Priority: Major
>
> Currently it appears that Java reader reads files created by java writer
> which could suppress backward compatibility issues. C++ side does this so it
> would be good to if Java sideĀ does the same.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)