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

orc-tools JsonReader does not support uniontype in schema

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.4
    • 1.7.4
    • Java, tools
    • 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.

      Attachments

        Issue Links

          Activity

            People

              rizaon Riza Suminto
              erwaman Anthony Hsu
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: