You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "slim bouguerra (JIRA)" <ji...@apache.org> on 2018/05/24 21:27:00 UTC

[jira] [Commented] (HIVE-19675) Cast to timestamps on Druid time column leads to an exception

    [ https://issues.apache.org/jira/browse/HIVE-19675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16489831#comment-16489831 ] 

slim bouguerra commented on HIVE-19675:
---------------------------------------

Exception stack.
{code}
2018-05-24T14:23:08,356 ERROR [bed0135d-46f9-495c-a71a-686aa8c449a2 main] CliDriver: Failed with exception java.io.IOException:java.lang.NumberFormatException: For input string: "2015-03-08 00:00:00"
java.io.IOException: java.lang.NumberFormatException: For input string: "2015-03-08 00:00:00"
        at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:602)
        at org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:509)
        at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:145)
        at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:2509)
        at org.apache.hadoop.hive.ql.reexec.ReExecDriver.getResults(ReExecDriver.java:229)
        at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:188)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:402)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:335)
        at org.apache.hadoop.hive.ql.QTestUtil.executeClientInternal(QTestUtil.java:1485)
        at org.apache.hadoop.hive.ql.QTestUtil.executeClient(QTestUtil.java:1459)
        at org.apache.hadoop.hive.cli.control.CoreCliDriver.runTest(CoreCliDriver.java:177)
        at org.apache.hadoop.hive.cli.control.CliAdapter.runTest(CliAdapter.java:104)
        at org.apache.hadoop.hive.cli.TestMiniDruidLocalCliDriver.testCliDriver(TestMiniDruidLocalCliDriver.java:43)
        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:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        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.rules.RunRules.evaluate(RunRules.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.junit.runners.Suite.runChild(Suite.java:127)
        at org.junit.runners.Suite.runChild(Suite.java:26)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        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.run(ParentRunner.java:309)
        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.invokeProviderInSameClassLoader(ForkedBooter.java:379)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
        at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)
Caused by: java.lang.NumberFormatException: For input string: "2015-03-08 00:00:00"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:580)
        at java.lang.Integer.valueOf(Integer.java:766)
        at org.apache.hadoop.hive.druid.serde.DruidGroupByQueryRecordReader.lambda$nextKeyValue$2(DruidGroupByQueryRecordReader.java:113)
        at org.apache.hive.druid.com.google.common.collect.Maps$10.getValue(Maps.java:1855)
        at java.util.HashMap.putMapEntries(HashMap.java:513)
        at java.util.HashMap.putAll(HashMap.java:784)
        at org.apache.hadoop.hive.druid.serde.DruidGroupByQueryRecordReader.next(DruidGroupByQueryRecordReader.java:151)
        at org.apache.hadoop.hive.druid.serde.DruidGroupByQueryRecordReader.next(DruidGroupByQueryRecordReader.java:48)
        at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:569)
        ... 50 more
{code}

> Cast to timestamps on Druid time column leads to an exception
> -------------------------------------------------------------
>
>                 Key: HIVE-19675
>                 URL: https://issues.apache.org/jira/browse/HIVE-19675
>             Project: Hive
>          Issue Type: Bug
>          Components: Druid integration
>    Affects Versions: 3.0.0
>            Reporter: slim bouguerra
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Major
>
> The following query fail due to a formatting issue.
> {code}
> SELECT CAST(`ssb_druid_100`.`__time` AS TIMESTAMP) AS `x_time`,
> . . . . . . . . . . . . . . . .>   SUM(`ssb_druid_100`.`lo_revenue`) AS `sum_lo_revenue_ok`
> . . . . . . . . . . . . . . . .> FROM `druid_ssb`.`ssb_druid_100` `ssb_druid_100`
> . . . . . . . . . . . . . . . .> GROUP BY CAST(`ssb_druid_100`.`__time` AS TIMESTAMP);
> {code} 
> Exception
> {code} 
> Error: java.io.IOException: java.lang.NumberFormatException: For input string: "1991-12-31 19:00:00" (state=,code=0)
> {code}
> [~jcamachorodriguez] maybe this is fixed by your upcoming patches.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)