Hive
  1. Hive
  2. HIVE-234

TableSample missing sample filter should have better error message

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: 0.3.0
    • Component/s: Query Processor
    • Labels:
      None

      Description

      09/01/16 00:46:22 INFO parse.SemanticAnalyzer: Completed getting MetaData in Semantic Analysis
      09/01/16 00:46:22 INFO parse.SemanticAnalyzer: Need sample filter
      FAILED: Unknown exception : null

        Activity

        Hide
        Raghotham Murthy added a comment -

        This exception was caused by bad metadata. Once the metadata was fixed, the query ran fine. The problem was that the bucketCol for the table in the metadata was a column not actually in the schema of the table.

        Show
        Raghotham Murthy added a comment - This exception was caused by bad metadata. Once the metadata was fixed, the query ran fine. The problem was that the bucketCol for the table in the metadata was a column not actually in the schema of the table.
        Hide
        Zheng Shao added a comment -

        SELECT 1 AS event, t.c1, t.c2, t.c3
        FROM table1 TABLESAMPLE (BUCKET 1 OUT OF 1024) t
        WHERE t.ds = '2009-01-14' AND t.network_id > '0'

        Show
        Zheng Shao added a comment - SELECT 1 AS event, t.c1, t.c2, t.c3 FROM table1 TABLESAMPLE (BUCKET 1 OUT OF 1024) t WHERE t.ds = '2009-01-14' AND t.network_id > '0'
        Hide
        Raghotham Murthy added a comment -

        Zheng,

        Can you include a sample query?

        Show
        Raghotham Murthy added a comment - Zheng, Can you include a sample query?
        Hide
        Zheng Shao added a comment -

        Stack Trace: java.lang.NullPointerException
        at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genSamplePredicate(SemanticAnalyzer.java:2821)
        at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genTablePlan(SemanticAnalyzer.java:2949)
        at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:2991)
        at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:2964)
        at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:2967)
        at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:2985)
        at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:3193)
        at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:71)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:169)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:174)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:207)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:268)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:166)
        at org.apache.hadoop.mapred.JobShell.run(JobShell.java:194)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at org.apache.hadoop.mapred.JobShell.main(JobShell.java:220)

        Show
        Zheng Shao added a comment - Stack Trace: java.lang.NullPointerException at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genSamplePredicate(SemanticAnalyzer.java:2821) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genTablePlan(SemanticAnalyzer.java:2949) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:2991) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:2964) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:2967) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:2985) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:3193) at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:71) at org.apache.hadoop.hive.ql.Driver.run(Driver.java:169) at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:174) at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:207) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:268) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.RunJar.main(RunJar.java:166) at org.apache.hadoop.mapred.JobShell.run(JobShell.java:194) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79) at org.apache.hadoop.mapred.JobShell.main(JobShell.java:220)

          People

          • Assignee:
            Raghotham Murthy
            Reporter:
            Zheng Shao
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development