Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-7706

ClassCastException trying to CTAS table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      I have a table called item and when I try and do either of these:

      create table table test as select * from item;
      insert overwrite table test select * from item;
      

      I get the error below.

      FAILED: ClassCastException org.apache.hadoop.hive.ql.plan.SparkWork cannot be cast to org.apache.hadoop.hive.ql.plan.TezWork
      14/08/12 19:34:02 ERROR ql.Driver: FAILED: ClassCastException org.apache.hadoop.hive.ql.plan.SparkWork cannot be cast to org.apache.hadoop.hive.ql.plan.TezWork
      java.lang.ClassCastException: org.apache.hadoop.hive.ql.plan.SparkWork cannot be cast to org.apache.hadoop.hive.ql.plan.TezWork
      	at org.apache.hadoop.hive.ql.optimizer.GenMapRedUtils.addStatsTask(GenMapRedUtils.java:1426)
      	at org.apache.hadoop.hive.ql.optimizer.GenMapRedUtils.isMergeRequired(GenMapRedUtils.java:1656)
      	at org.apache.hadoop.hive.ql.parse.spark.GenSparkUtils.processFileSink(GenSparkUtils.java:281)
      	at org.apache.hadoop.hive.ql.parse.spark.SparkCompiler.generateTaskTree(SparkCompiler.java:187)
      	at org.apache.hadoop.hive.ql.parse.TaskCompiler.compile(TaskCompiler.java:199)
      	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:9508)
      	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:208)
      	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:414)
      	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:310)
      	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1005)
      	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1070)
      	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:942)
      	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:932)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              brocknoland Brock Noland
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: