orc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Hsu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ORC-236) orc-tools JsonReader does not support uniontype in schema
Date Tue, 12 Sep 2017 16:08:00 GMT
Anthony Hsu created ORC-236:
-------------------------------

             Summary: orc-tools JsonReader does not support uniontype in schema
                 Key: ORC-236
                 URL: https://issues.apache.org/jira/browse/ORC-236
             Project: ORC
          Issue Type: Bug
            Reporter: Anthony Hsu


To repro:

{noformat}
$ cat sample.json
{"foo":1}

$ java -jar ~/lib/orc-tools-1.4.0-uber.jar convert -s "struct<foo:uniontype<int,string>>"
-o output.orc sample.json
log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Processing sample.json
Exception in thread "main" java.lang.IllegalArgumentException: Unhandled type uniontype<int,string>
	at org.apache.orc.tools.convert.JsonReader.createConverter(JsonReader.java:233)
	at org.apache.orc.tools.convert.JsonReader.<init>(JsonReader.java:260)
	at org.apache.orc.tools.convert.ConvertTool.main(ConvertTool.java:67)
	at org.apache.orc.tools.Driver.main(Driver.java:112)
{noformat}

Seems like [JsonReader.createConverter|https://github.com/apache/orc/blob/635833d13ff4a5c6a4ea3d73bc41af3efaf816cd/java/tools/src/java/org/apache/orc/tools/convert/JsonReader.java#L224]
does not support [UNION|https://github.com/apache/orc/blob/master/java/core/src/java/org/apache/orc/TypeDescription.java#L116].



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message