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

NPE in StatsUtils::getColStatistics when all values in DATE column are NULL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2.0
    • Statistics
    • None
    • Reviewed

    Description

      Observed the following stacktrace, when all the values are NULL in date column.

      2017-01-04T19:10:37,779 ERROR [46f293ab-1516-429d-aaab-4d5818ef8b82 main] ql.Driver: FAILED: NullPointerException null
      java.lang.NullPointerException
              at org.apache.hadoop.hive.ql.stats.StatsUtils.getColStatistics(StatsUtils.java:759)
              at org.apache.hadoop.hive.ql.stats.StatsUtils.convertColStats(StatsUtils.java:806)
              at org.apache.hadoop.hive.ql.stats.StatsUtils.getTableColumnStats(StatsUtils.java:792)
              at org.apache.hadoop.hive.ql.stats.StatsUtils.collectStatistics(StatsUtils.java:206)
              at org.apache.hadoop.hive.ql.stats.StatsUtils.collectStatistics(StatsUtils.java:152)
              at org.apache.hadoop.hive.ql.stats.StatsUtils.collectStatistics(StatsUtils.java:140)
              at org.apache.hadoop.hive.ql.optimizer.stats.annotation.StatsRulesProcFactory$TableScanStatsRule.process(StatsRulesProcFactory.java:128)
              at org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher.dispatch(DefaultRuleDispatcher.java:90)
              at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatchAndReturn(DefaultGraphWalker.java:105)
              at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatch(DefaultGraphWalker.java:89)
              at org.apache.hadoop.hive.ql.lib.LevelOrderWalker.walk(LevelOrderWalker.java:143)
              at org.apache.hadoop.hive.ql.lib.LevelOrderWalker.startWalking(LevelOrderWalker.java:122)
              at org.apache.hadoop.hive.ql.optimizer.stats.annotation.AnnotateWithStatistics.transform(AnnotateWithStatistics.java:78)
              at org.apache.hadoop.hive.ql.parse.TezCompiler.runStatsAnnotation(TezCompiler.java:260)
              at org.apache.hadoop.hive.ql.parse.TezCompiler.optimizeOperatorPlan(TezCompiler.java:129)
              at org.apache.hadoop.hive.ql.parse.TaskCompiler.compile(TaskCompiler.java:140)
              at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:11071)
              at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10644)
              at org.apache.hadoop.hive.ql.parse.ColumnStatsSemanticAnalyzer.analyze(ColumnStatsSemanticAnalyzer.java:412)
              at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:510)
              at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1302)
              at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1442)
              at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1222)
              at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1212)
              at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:233)
              at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:184)
              at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:400)
              at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:777)
              at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:715)
              at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:642)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
              at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
      

      Attachments

        1. HIVE-15542.1.patch
          6 kB
          Rajesh Balamohan
        2. HIVE-15542.2.patch
          6 kB
          Rajesh Balamohan

        Activity

          People

            rajesh.balamohan Rajesh Balamohan
            rajesh.balamohan Rajesh Balamohan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: