Uploaded image for project: 'ORC'
  1. ORC
  2. ORC-236

orc-tools JsonReader does not support uniontype in schema

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      To repro:

      $ 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)
      

      Seems like JsonReader.createConverter does not support UNION.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            erwaman Anthony Hsu
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development