Hive
  1. Hive
  2. HIVE-3248

lack of semi-colon in .q file leads to missing the next statement

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.10.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      set hive.check.par=1

      select count(1) from src;
      select count(1) from src;

      If the above .q file is executed, the first statement is lost.
      Found this while reviewing https://issues.apache.org/jira/browse/HIVE-2848

      1. hive-3248.1.patch.txt
        0.7 kB
        Edward Capriolo

        Activity

        Hide
        Ashutosh Chauhan added a comment -

        This issue is fixed and released as part of 0.10.0 release. If you find an issue which seems to be related to this one, please create a new jira and link this one with new jira.

        Show
        Ashutosh Chauhan added a comment - This issue is fixed and released as part of 0.10.0 release. If you find an issue which seems to be related to this one, please create a new jira and link this one with new jira.
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-hadoop2 #54 (See https://builds.apache.org/job/Hive-trunk-hadoop2/54/)
        HIVE-3248 lack of semi-colon in .q file leads to missing the next statement
        (Edward Capriolo via namit) (Revision 1362364)

        Result = ABORTED
        namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1362364
        Files :

        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java
        Show
        Hudson added a comment - Integrated in Hive-trunk-hadoop2 #54 (See https://builds.apache.org/job/Hive-trunk-hadoop2/54/ ) HIVE-3248 lack of semi-colon in .q file leads to missing the next statement (Edward Capriolo via namit) (Revision 1362364) Result = ABORTED namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1362364 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-h0.21 #1547 (See https://builds.apache.org/job/Hive-trunk-h0.21/1547/)
        HIVE-3248 lack of semi-colon in .q file leads to missing the next statement
        (Edward Capriolo via namit) (Revision 1362364)

        Result = SUCCESS
        namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1362364
        Files :

        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java
        Show
        Hudson added a comment - Integrated in Hive-trunk-h0.21 #1547 (See https://builds.apache.org/job/Hive-trunk-h0.21/1547/ ) HIVE-3248 lack of semi-colon in .q file leads to missing the next statement (Edward Capriolo via namit) (Revision 1362364) Result = SUCCESS namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1362364 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java
        Hide
        Namit Jain added a comment -

        Committed. Thanks Edward

        Show
        Namit Jain added a comment - Committed. Thanks Edward
        Hide
        Namit Jain added a comment -

        +1

        Show
        Namit Jain added a comment - +1
        Hide
        Edward Capriolo added a comment -
        [edward@tablitha dist]$ bin/hive
        Logging initialized using configuration in jar:file:/home/edward/hive/trunk/build/dist/lib/hive-common-0.10.0-SNAPSHOT.jar!/hive-log4j.properties
        Hive history file=/tmp/edward/hive_job_log_edward_201207140912_1644195707.txt
        hive> set x=5;
        hive> set x=dadkfjksfd
            > dfkjsfd
            > select * fromtable;
        Warning: Value had a \n character in it
        hive> 
        
        Show
        Edward Capriolo added a comment - [edward@tablitha dist]$ bin/hive Logging initialized using configuration in jar:file:/home/edward/hive/trunk/build/dist/lib/hive-common-0.10.0-SNAPSHOT.jar!/hive-log4j.properties Hive history file=/tmp/edward/hive_job_log_edward_201207140912_1644195707.txt hive> set x=5; hive> set x=dadkfjksfd > dfkjsfd > select * fromtable; Warning: Value had a \n character in it hive>
        Hide
        Edward Capriolo added a comment -
        • warn on multi-line set statements.
        Show
        Edward Capriolo added a comment - warn on multi-line set statements.
        Hide
        Edward Capriolo added a comment -

        I took this issue over. Even thought multi-line sets will rarely be used we probably do not want to remove it just to add it back later. I am suggesting we have SetProcessor warn on multi-line comments.

        Show
        Edward Capriolo added a comment - I took this issue over. Even thought multi-line sets will rarely be used we probably do not want to remove it just to add it back later. I am suggesting we have SetProcessor warn on multi-line comments.
        Hide
        Navis added a comment -

        Yes, so I've noticed it while testing HIVE-2848. But what if the type is string or the key is not registered conf?

        Show
        Navis added a comment - Yes, so I've noticed it while testing HIVE-2848 . But what if the type is string or the key is not registered conf?
        Hide
        Namit Jain added a comment -

        If the parameter hive.check.par in the above example is an integer, HIVE-2848 should catch this.
        Isn't that right ?

        Show
        Namit Jain added a comment - If the parameter hive.check.par in the above example is an integer, HIVE-2848 should catch this. Isn't that right ?
        Hide
        Navis added a comment -

        In above case, hive sets 'hive.check.par' as '1\n\nselect count(1) from src', which is a totally valid command.

        HIVE-2848 can help detecting some of these cases but generally, seemed not to be resolved, IMHO.

        Show
        Navis added a comment - In above case, hive sets 'hive.check.par' as '1\n\nselect count(1) from src', which is a totally valid command. HIVE-2848 can help detecting some of these cases but generally, seemed not to be resolved, IMHO.

          People

          • Assignee:
            Edward Capriolo
            Reporter:
            Namit Jain
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development