[ https://issues.apache.org/jira/browse/HIVE-21453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16793686#comment-16793686 ]
Hive QA commented on HIVE-21453: -------------------------------- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || || || || || {color:brown} Prechecks {color} || | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | || || || || {color:brown} master Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 8m 23s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 20s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 12s{color} | {color:green} master passed {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 0m 46s{color} | {color:blue} hplsql in master has 157 extant Findbugs warnings. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 19s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 0m 21s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 20s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 20s{color} | {color:green} the patch passed {color} | | {color:red}-1{color} | {color:red} checkstyle {color} | {color:red} 0m 12s{color} | {color:red} hplsql: The patch generated 4 new + 266 unchanged - 0 fixed = 270 total (was 266) {color} | | {color:red}-1{color} | {color:red} whitespace {color} | {color:red} 0m 0s{color} | {color:red} The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 0m 58s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 19s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:red}-1{color} | {color:red} asflicense {color} | {color:red} 0m 14s{color} | {color:red} The patch generated 2 ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 12m 51s{color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | Optional Tests | asflicense javac javadoc findbugs checkstyle compile | | uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux | | Build tool | maven | | Personality | /data/hiveptest/working/yetus_PreCommit-HIVE-Build-16528/dev-support/hive-personality.sh | | git revision | master / bc79adf | | Default Java | 1.8.0_111 | | findbugs | v3.0.0 | | checkstyle | http://104.198.109.242/logs//PreCommit-HIVE-Build-16528/yetus/diff-checkstyle-hplsql.txt | | whitespace | http://104.198.109.242/logs//PreCommit-HIVE-Build-16528/yetus/whitespace-eol.txt | | asflicense | http://104.198.109.242/logs//PreCommit-HIVE-Build-16528/yetus/patch-asflicense-problems.txt | | modules | C: hplsql U: hplsql | | Console output | http://104.198.109.242/logs//PreCommit-HIVE-Build-16528/yetus.txt | | Powered by | Apache Yetus http://yetus.apache.org | This message was automatically generated. > HPL/SQL can not SELECT Date and Timestamp type value into variable > ------------------------------------------------------------------- > > Key: HIVE-21453 > URL: https://issues.apache.org/jira/browse/HIVE-21453 > Project: Hive > Issue Type: Bug > Components: hpl/sql > Affects Versions: 3.1.1 > Environment: Centos 7.1, Hive 3.1.1 > Reporter: DingQiang Liu > Assignee: DingQiang Liu > Priority: Minor > Labels: pull-request-available > Attachments: HIVE-21453.patch > > Time Spent: 0.5h > Remaining Estimate: 0h > > HPL/SQL forgot Date and Timestamp types when SELECT INTO variables. for > example, current implement will set null, not correct value, to variables > for following case, select_into3.sql: > declare v_date date; > declare v_timestamp timestamp(17, 3); > select > cast('2019-02-20 12:23:45.678' as date), > cast('2019-02-20 12:23:45.678' as timestamp) > into > v_date, > v_timestamp > from src limit 1; > print 'date: ' || v_date; > print 'timestamp: ' || v_timestamp; > The result when running : bin/hplsql -f select_into3.sql --trace > Configuration file: file:/hive/conf/hplsql-site.xml > Parser tree: (program (block (stmt (declare_stmt declare (declare_stmt_item > (declare_var_item (ident v_date) (dtype date))))) (stmt (semicolon_stmt ;)) > (stmt (declare_stmt declare (declare_stmt_item (declare_var_item (ident > v_timestamp) (dtype timestamp) (dtype_len ( 17 , 3 )))))) (stmt > (semicolon_stmt ;)) (stmt (select_stmt (fullselect_stmt (fullselect_stmt_item > (subselect_stmt select (select_list (select_list_item (expr (expr_spec_func > cast ( (expr (expr_atom (string '2019-02-20 12:23:45.678'))) as (dtype date) > )))) , (select_list_item (expr (expr_spec_func cast ( (expr (expr_atom > (string '2019-02-20 12:23:45.678'))) as (dtype timestamp) ))))) (into_clause > into (ident v_date) , (ident v_timestamp)) (from_clause from > (from_table_clause (from_table_name_clause (table_name (ident src))))) > (select_options (select_options_item limit (expr (expr_atom (int_number > 1)))))))))) (stmt (semicolon_stmt ;)) (stmt (print_stmt print (expr > (expr_concat (expr_concat_item (expr_atom (string 'date: '))) || > (expr_concat_item (expr_atom (ident v_date))))))) (stmt (semicolon_stmt ;)) > (stmt (print_stmt print (expr (expr_concat (expr_concat_item (expr_atom > (string 'timestamp: '))) || (expr_concat_item (expr_atom (ident > v_timestamp))))))) (stmt (semicolon_stmt ;))) <EOF>) > Ln:1 DECLARE v_date date > Ln:2 DECLARE v_timestamp timestamp > Ln:4 SELECT > Ln:4 select > cast('2019-02-20 12:23:45.678' as date), cast('2019-02-20 12:23:45.678' as > timestamp) > from src LIMIT 1 > Open connection: jdbc:vertica://v001:5433/test (256 ms) > Starting query > Query executed successfully (55 ms) > Ln:4 SELECT completed successfully > Ln:4 SELECT INTO statement executed > Ln:4 COLUMN: ?column?, Date > Ln:4 SET v_date = null > Ln:4 COLUMN: ?column?, Timestamp > Ln:4 SET v_timestamp = null > Ln:12 PRINT > date: > Ln:13 PRINT > timestamp: -- This message was sent by Atlassian JIRA (v7.6.3#76005)