Dayakar M created HIVE-28076:
--------------------------------

             Summary: Selecting data from a bucketed table with decimal column 
type throwing NPE.
                 Key: HIVE-28076
                 URL: https://issues.apache.org/jira/browse/HIVE-28076
             Project: Hive
          Issue Type: Bug
          Components: HiveServer2
            Reporter: Dayakar M
            Assignee: Dayakar M


selecting data from a bucketed table with decimal bucket column type throwing 
NPE.

Steps to reproduce:
{noformat}
create table bucket_table(id decimal(38,0), name string) clustered by(id) into 
3 buckets;
insert into bucket_table values(5000000000000999640711, 'Cloud');

select * from bucket_table bt where id = 5000000000000999640711;{noformat}
HS2 log contains NPE:
{noformat}
ql.Driver: FAILED: NullPointerException null
java.lang.NullPointerException
   at 
org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.hashCodeMurmur(ObjectInspectorUtils.java:889)
   at 
org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.getBucketHashCode(ObjectInspectorUtils.java:805)
   at 
org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.getBucketNumber(ObjectInspectorUtils.java:638)
   at 
org.apache.hadoop.hive.ql.optimizer.FixedBucketPruningOptimizer$BucketBitsetGenerator.generatePredicate(FixedBucketPruningOptimizer.java:225)
   at 
org.apache.hadoop.hive.ql.optimizer.PrunerOperatorFactory$FilterPruner.process(PrunerOperatorFactory.java:87)
   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.DefaultGraphWalker.walk(DefaultGraphWalker.java:158)
   at 
org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.startWalking(DefaultGraphWalker.java:120)
   at 
org.apache.hadoop.hive.ql.optimizer.PrunerUtils.walkOperatorTree(PrunerUtils.java:84)
   at 
org.apache.hadoop.hive.ql.optimizer.FixedBucketPruningOptimizer.transform(FixedBucketPruningOptimizer.java:331)
   at org.apache.hadoop.hive.ql.optimizer.Optimizer.optimize(Optimizer.java:249)
   at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12995)
   at 
org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:443)
   at 
org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:303)
   at org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:220)
   at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:105)
   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:194)
   at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:621)
   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:567)
   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:561)
   at 
org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:127)
   at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:231)
   at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:260)
   at org.apache.hadoop.hive.cli.CliDriver.processCmd1(CliDriver.java:204)
   at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:130)
   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:429)
   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:360)
   at 
org.apache.hadoop.hive.ql.QTestUtil.executeClientInternal(QTestUtil.java:857)
   at org.apache.hadoop.hive.ql.QTestUtil.executeClient(QTestUtil.java:827)
   at 
org.apache.hadoop.hive.cli.control.CoreCliDriver.runTest(CoreCliDriver.java:191)
   at org.apache.hadoop.hive.cli.control.CliAdapter.runTest(CliAdapter.java:104)
   at 
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver(TestMiniLlapLocalCliDriver.java:62)
   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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
   at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
   at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   at 
org.apache.hadoop.hive.cli.control.CliAdapter$2$1.evaluate(CliAdapter.java:92)
   at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
   at 
org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
   at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
   at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
   at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
   at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
   at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
   at org.junit.runners.Suite.runChild(Suite.java:128)
   at org.junit.runners.Suite.runChild(Suite.java:27)
   at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
   at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
   at 
org.apache.hadoop.hive.cli.control.CliAdapter$1$1.evaluate(CliAdapter.java:73)
   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
   at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
   at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
   at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
   at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
   at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
   at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
   at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:377)
   at 
org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:138)
   at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:465)
   at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:451){noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to