Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-1327

Shell may fail to run queries from file if comments are present

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Cannot Reproduce
    • Impala 2.0
    • None
    • Clients

    Description

      The attached sql file fails part way through.

      ...
      Fetched 1 row(s) in 0.76s
      Query: select t2.date_string_col AS string_col_1
      FROM alltypesagg t1
      RIGHT JOIN alltypestiny t2 ON t2.date_string_col = t1.string_col AND t2.year = t1.int_col;
      SELECT
      MAX(t2.smallint_col) AS smallint_col_1
      FROM alltypesagg t1
      INNER JOIN alltypes t2 ON t2.string_col = t1.string_col
      INNER JOIN alltypes t3 ON t3.date_string_col = t2.string_col AND t3.string_col = t1.date_string_col;
      SELECT
      MAX(t2.year) AS int_col_1
      FROM alltypes t1
      INNER JOIN alltypesagg t2 ON t2.string_col = t1.string_col;
      SELECT
      COUNT(t2.date_string_col) AS int_col_1
      FROM alltypestiny t1
      INNER JOIN alltypesagg t2 ON t2.day = t1.int_col AND t2.date_string_col = t1.date_string_col;
      SELECT
      SUM(t3.smallint_col) AS smallint_col_1
      FROM alltypes t1
      INNER JOIN alltypesagg t2 ON t2.day = t1.smallint_col AND t2.date_string_col = t1.date_string_col
      INNER JOIN alltypes t3 ON t3.date_string_col = t1.date_string_col
      ERROR: Error: Error: could not match input
      

      If the comments are removed, the file runs fine.

      Also the commented file runs fine in Postgresql

      
      [casey@vd0206 comparison]$ psql --username=postgres --dbname=functional -f sql &> log
      
      
      [casey@vd0206 comparison]$ echo $?
      0
      
      
      [casey@vd0206 comparison]$ tail log
       int_col_1 
      -----------
               0
      (1 row)
      
       smallint_col_1 
      ----------------
               405000
      (1 row)
      

      Attachments

        1. log
          191 kB
          casey
        2. sql
          5 kB
          casey

        Activity

          People

            ishaan Ishaan Joshi
            caseyc casey
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: