[jira] [Commented] (HIVE-3191) timestamp - timestamp causes null pointer exception
[ https://issues.apache.org/jira/browse/HIVE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400367#comment-13400367 ] Navis commented on HIVE-3191: - https://reviews.facebook.net/D3807 I have similar use cases in some legacy SQLs something like this.. select '2012-01-01 00:00:00' + ('2011-01-01 04:00:00.4567' - '2011-01-01 02:15:00.5678') ~~ The fetch made recently and under testing but I cannot get exact meaning of +/- between timestamp values. Any suggestion or references would be greatly appreciated. > timestamp - timestamp causes null pointer exception > --- > > Key: HIVE-3191 > URL: https://issues.apache.org/jira/browse/HIVE-3191 > Project: Hive > Issue Type: Bug >Affects Versions: 0.8.0 >Reporter: N Campbell > > select tts.rnum, tts.cts - tts.cts from cert.tts tts > Error: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: > java.lang.NullPointerException(null) > SQLState: 42000 > ErrorCode: 12 > create table if not exists CERT.TTS ( RNUM int , CTS timestamp) > stored as sequencefile; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-3191) timestamp - timestamp causes null pointer exception
[ https://issues.apache.org/jira/browse/HIVE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13732833#comment-13732833 ] Jason Dere commented on HIVE-3191: -- Looking at the diff, I think timestamp - timestamp should not return a timestamp result, as you can see in the test case the results formatted to string don't look correct ('2011-01-01 01:01:02.4567 - '1970-01-01 01:01:01.5678' = 2011-01-01 00:00:00.8889). Date/timestamp arithmetic should be really be returning an INTERVAL type as the result. So let's do the quick fix to avoid NPE here, and hopefully support interval data type in future work. In the meantime users can cast/convert the timestamp to a numeric value and perform arithmetic operations. > timestamp - timestamp causes null pointer exception > --- > > Key: HIVE-3191 > URL: https://issues.apache.org/jira/browse/HIVE-3191 > Project: Hive > Issue Type: Bug >Affects Versions: 0.8.0 >Reporter: N Campbell > > select tts.rnum, tts.cts - tts.cts from cert.tts tts > Error: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: > java.lang.NullPointerException(null) > SQLState: 42000 > ErrorCode: 12 > create table if not exists CERT.TTS ( RNUM int , CTS timestamp) > stored as sequencefile; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-3191) timestamp - timestamp causes null pointer exception
[ https://issues.apache.org/jira/browse/HIVE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13733034#comment-13733034 ] Gunther Hagleitner commented on HIVE-3191: -- [~jdere]: Yeah, sounds good. An INTERVAL type as per SQL standard would be great in future. For now it makes sense to fail gracefully. As for the fix: Both ComparisonOpMethodResolver as well as DefaultMethodResolver throw NoMatchingMethodException when they find no applicable UDF. So, I think it makes more sense to put the same check for NumericOpReolver rather than check for null on the calling function. What do you think? > timestamp - timestamp causes null pointer exception > --- > > Key: HIVE-3191 > URL: https://issues.apache.org/jira/browse/HIVE-3191 > Project: Hive > Issue Type: Bug >Affects Versions: 0.8.0 >Reporter: N Campbell >Assignee: Jason Dere > Attachments: HIVE-3191.1.patch > > > select tts.rnum, tts.cts - tts.cts from cert.tts tts > Error: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: > java.lang.NullPointerException(null) > SQLState: 42000 > ErrorCode: 12 > create table if not exists CERT.TTS ( RNUM int , CTS timestamp) > stored as sequencefile; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-3191) timestamp - timestamp causes null pointer exception
[ https://issues.apache.org/jira/browse/HIVE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13733045#comment-13733045 ] Jason Dere commented on HIVE-3191: -- Yeah that makes sense, will move the check to NumericOpResolver. > timestamp - timestamp causes null pointer exception > --- > > Key: HIVE-3191 > URL: https://issues.apache.org/jira/browse/HIVE-3191 > Project: Hive > Issue Type: Bug >Affects Versions: 0.8.0 >Reporter: N Campbell >Assignee: Jason Dere > Attachments: HIVE-3191.1.patch > > > select tts.rnum, tts.cts - tts.cts from cert.tts tts > Error: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: > java.lang.NullPointerException(null) > SQLState: 42000 > ErrorCode: 12 > create table if not exists CERT.TTS ( RNUM int , CTS timestamp) > stored as sequencefile; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-3191) timestamp - timestamp causes null pointer exception
[ https://issues.apache.org/jira/browse/HIVE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13733055#comment-13733055 ] Jason Dere commented on HIVE-3191: -- New patch uploaded, moved the null check to NumericOpResolver. > timestamp - timestamp causes null pointer exception > --- > > Key: HIVE-3191 > URL: https://issues.apache.org/jira/browse/HIVE-3191 > Project: Hive > Issue Type: Bug >Affects Versions: 0.8.0 >Reporter: N Campbell >Assignee: Jason Dere > Attachments: HIVE-3191.1.patch, HIVE-3191.2.patch > > > select tts.rnum, tts.cts - tts.cts from cert.tts tts > Error: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: > java.lang.NullPointerException(null) > SQLState: 42000 > ErrorCode: 12 > create table if not exists CERT.TTS ( RNUM int , CTS timestamp) > stored as sequencefile; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-3191) timestamp - timestamp causes null pointer exception
[ https://issues.apache.org/jira/browse/HIVE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13733075#comment-13733075 ] Gunther Hagleitner commented on HIVE-3191: -- LGTM +1. Will commit if tests pass. > timestamp - timestamp causes null pointer exception > --- > > Key: HIVE-3191 > URL: https://issues.apache.org/jira/browse/HIVE-3191 > Project: Hive > Issue Type: Bug >Affects Versions: 0.8.0 >Reporter: N Campbell >Assignee: Jason Dere > Attachments: HIVE-3191.1.patch, HIVE-3191.2.patch > > > select tts.rnum, tts.cts - tts.cts from cert.tts tts > Error: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: > java.lang.NullPointerException(null) > SQLState: 42000 > ErrorCode: 12 > create table if not exists CERT.TTS ( RNUM int , CTS timestamp) > stored as sequencefile; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-3191) timestamp - timestamp causes null pointer exception
[ https://issues.apache.org/jira/browse/HIVE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13733906#comment-13733906 ] Gunther Hagleitner commented on HIVE-3191: -- Reuploading .2 as .3 to retrigger tests (failed because of unrelated build issue) > timestamp - timestamp causes null pointer exception > --- > > Key: HIVE-3191 > URL: https://issues.apache.org/jira/browse/HIVE-3191 > Project: Hive > Issue Type: Bug >Affects Versions: 0.8.0 >Reporter: N Campbell >Assignee: Jason Dere > Attachments: HIVE-3191.1.patch, HIVE-3191.2.patch, HIVE-3191.3.patch > > > select tts.rnum, tts.cts - tts.cts from cert.tts tts > Error: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: > java.lang.NullPointerException(null) > SQLState: 42000 > ErrorCode: 12 > create table if not exists CERT.TTS ( RNUM int , CTS timestamp) > stored as sequencefile; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-3191) timestamp - timestamp causes null pointer exception
[ https://issues.apache.org/jira/browse/HIVE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13734400#comment-13734400 ] Hive QA commented on HIVE-3191: --- {color:red}Overall{color}: -1 at least one tests failed Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12596925/HIVE-3191.3.patch {color:red}ERROR:{color} -1 due to 2 failed/errored test(s), 2773 tests executed *Failed tests:* {noformat} org.apache.hcatalog.mapreduce.TestHCatPartitioned.testHCatPartitionedTable org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_ppd_vc {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/350/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/350/console Messages: {noformat} Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests failed with: TestsFailedException: 2 tests failed {noformat} This message is automatically generated. > timestamp - timestamp causes null pointer exception > --- > > Key: HIVE-3191 > URL: https://issues.apache.org/jira/browse/HIVE-3191 > Project: Hive > Issue Type: Bug >Affects Versions: 0.8.0 >Reporter: N Campbell >Assignee: Jason Dere > Attachments: HIVE-3191.1.patch, HIVE-3191.2.patch, HIVE-3191.3.patch > > > select tts.rnum, tts.cts - tts.cts from cert.tts tts > Error: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: > java.lang.NullPointerException(null) > SQLState: 42000 > ErrorCode: 12 > create table if not exists CERT.TTS ( RNUM int , CTS timestamp) > stored as sequencefile; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-3191) timestamp - timestamp causes null pointer exception
[ https://issues.apache.org/jira/browse/HIVE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13734480#comment-13734480 ] Gunther Hagleitner commented on HIVE-3191: -- Reported failures are unrelated. > timestamp - timestamp causes null pointer exception > --- > > Key: HIVE-3191 > URL: https://issues.apache.org/jira/browse/HIVE-3191 > Project: Hive > Issue Type: Bug >Affects Versions: 0.8.0 >Reporter: N Campbell >Assignee: Jason Dere > Attachments: HIVE-3191.1.patch, HIVE-3191.2.patch, HIVE-3191.3.patch > > > select tts.rnum, tts.cts - tts.cts from cert.tts tts > Error: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: > java.lang.NullPointerException(null) > SQLState: 42000 > ErrorCode: 12 > create table if not exists CERT.TTS ( RNUM int , CTS timestamp) > stored as sequencefile; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-3191) timestamp - timestamp causes null pointer exception
[ https://issues.apache.org/jira/browse/HIVE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13734481#comment-13734481 ] Gunther Hagleitner commented on HIVE-3191: -- Committed to trunk. Thanks Jason! > timestamp - timestamp causes null pointer exception > --- > > Key: HIVE-3191 > URL: https://issues.apache.org/jira/browse/HIVE-3191 > Project: Hive > Issue Type: Bug >Affects Versions: 0.8.0 >Reporter: N Campbell >Assignee: Jason Dere > Attachments: HIVE-3191.1.patch, HIVE-3191.2.patch, HIVE-3191.3.patch > > > select tts.rnum, tts.cts - tts.cts from cert.tts tts > Error: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: > java.lang.NullPointerException(null) > SQLState: 42000 > ErrorCode: 12 > create table if not exists CERT.TTS ( RNUM int , CTS timestamp) > stored as sequencefile; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-3191) timestamp - timestamp causes null pointer exception
[ https://issues.apache.org/jira/browse/HIVE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13735622#comment-13735622 ] Hudson commented on HIVE-3191: -- FAILURE: Integrated in Hive-trunk-hadoop2 #347 (See [https://builds.apache.org/job/Hive-trunk-hadoop2/347/]) HIVE-3191: timestamp - timestamp causes null pointer exception (Jason Dere via Gunther Hagleitner) (gunther: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1512165) * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/NumericOpMethodResolver.java * /hive/trunk/ql/src/test/queries/clientnegative/invalid_arithmetic_type.q * /hive/trunk/ql/src/test/results/clientnegative/invalid_arithmetic_type.q.out > timestamp - timestamp causes null pointer exception > --- > > Key: HIVE-3191 > URL: https://issues.apache.org/jira/browse/HIVE-3191 > Project: Hive > Issue Type: Bug >Affects Versions: 0.8.0 >Reporter: N Campbell >Assignee: Jason Dere > Fix For: 0.12.0 > > Attachments: HIVE-3191.1.patch, HIVE-3191.2.patch, HIVE-3191.3.patch > > > select tts.rnum, tts.cts - tts.cts from cert.tts tts > Error: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: > java.lang.NullPointerException(null) > SQLState: 42000 > ErrorCode: 12 > create table if not exists CERT.TTS ( RNUM int , CTS timestamp) > stored as sequencefile; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-3191) timestamp - timestamp causes null pointer exception
[ https://issues.apache.org/jira/browse/HIVE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13735676#comment-13735676 ] Hudson commented on HIVE-3191: -- SUCCESS: Integrated in Hive-trunk-h0.21 #2257 (See [https://builds.apache.org/job/Hive-trunk-h0.21/2257/]) HIVE-3191: timestamp - timestamp causes null pointer exception (Jason Dere via Gunther Hagleitner) (gunther: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1512165) * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/NumericOpMethodResolver.java * /hive/trunk/ql/src/test/queries/clientnegative/invalid_arithmetic_type.q * /hive/trunk/ql/src/test/results/clientnegative/invalid_arithmetic_type.q.out > timestamp - timestamp causes null pointer exception > --- > > Key: HIVE-3191 > URL: https://issues.apache.org/jira/browse/HIVE-3191 > Project: Hive > Issue Type: Bug >Affects Versions: 0.8.0 >Reporter: N Campbell >Assignee: Jason Dere > Fix For: 0.12.0 > > Attachments: HIVE-3191.1.patch, HIVE-3191.2.patch, HIVE-3191.3.patch > > > select tts.rnum, tts.cts - tts.cts from cert.tts tts > Error: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: > java.lang.NullPointerException(null) > SQLState: 42000 > ErrorCode: 12 > create table if not exists CERT.TTS ( RNUM int , CTS timestamp) > stored as sequencefile; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-3191) timestamp - timestamp causes null pointer exception
[ https://issues.apache.org/jira/browse/HIVE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13736075#comment-13736075 ] Hudson commented on HIVE-3191: -- FAILURE: Integrated in Hive-trunk-hadoop2-ptest #51 (See [https://builds.apache.org/job/Hive-trunk-hadoop2-ptest/51/]) HIVE-3191: timestamp - timestamp causes null pointer exception (Jason Dere via Gunther Hagleitner) (gunther: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1512165) * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/NumericOpMethodResolver.java * /hive/trunk/ql/src/test/queries/clientnegative/invalid_arithmetic_type.q * /hive/trunk/ql/src/test/results/clientnegative/invalid_arithmetic_type.q.out > timestamp - timestamp causes null pointer exception > --- > > Key: HIVE-3191 > URL: https://issues.apache.org/jira/browse/HIVE-3191 > Project: Hive > Issue Type: Bug >Affects Versions: 0.8.0 >Reporter: N Campbell >Assignee: Jason Dere > Fix For: 0.12.0 > > Attachments: HIVE-3191.1.patch, HIVE-3191.2.patch, HIVE-3191.3.patch > > > select tts.rnum, tts.cts - tts.cts from cert.tts tts > Error: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: > java.lang.NullPointerException(null) > SQLState: 42000 > ErrorCode: 12 > create table if not exists CERT.TTS ( RNUM int , CTS timestamp) > stored as sequencefile; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-3191) timestamp - timestamp causes null pointer exception
[ https://issues.apache.org/jira/browse/HIVE-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13736127#comment-13736127 ] Hudson commented on HIVE-3191: -- SUCCESS: Integrated in Hive-trunk-hadoop1-ptest #122 (See [https://builds.apache.org/job/Hive-trunk-hadoop1-ptest/122/]) HIVE-3191: timestamp - timestamp causes null pointer exception (Jason Dere via Gunther Hagleitner) (gunther: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1512165) * /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/NumericOpMethodResolver.java * /hive/trunk/ql/src/test/queries/clientnegative/invalid_arithmetic_type.q * /hive/trunk/ql/src/test/results/clientnegative/invalid_arithmetic_type.q.out > timestamp - timestamp causes null pointer exception > --- > > Key: HIVE-3191 > URL: https://issues.apache.org/jira/browse/HIVE-3191 > Project: Hive > Issue Type: Bug >Affects Versions: 0.8.0 >Reporter: N Campbell >Assignee: Jason Dere > Fix For: 0.12.0 > > Attachments: HIVE-3191.1.patch, HIVE-3191.2.patch, HIVE-3191.3.patch > > > select tts.rnum, tts.cts - tts.cts from cert.tts tts > Error: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: > java.lang.NullPointerException(null) > SQLState: 42000 > ErrorCode: 12 > create table if not exists CERT.TTS ( RNUM int , CTS timestamp) > stored as sequencefile; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira