Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-28003

Hive sql is wrongly modified by SqlCompleter in SQL client when using -f {file}

    XMLWordPrintableJSON

Details

    Description

      When I run the following sql in SqlClient using 'sql-client.sh -f zj_test.sql'

      create table if not exists db.zj_test(
      pos                   int,
      rank_cmd              string
      )
      partitioned by (
      `p_date` string,
      `p_hourmin` string);
      
      INSERT OVERWRITE TABLE db.zj_test PARTITION (p_date='20220605', p_hourmin = '0100')
      SELECT
      pos ,
      rank_cmd
      FROM db.sourceT
      where p_date = '20220605' and p_hourmin = '0100'; 

      An error would be thrown out because the 'pos' field is changed to 'POSITION'. I guess `SqlCompleter` in sqlClient module might do something wrong.

      The error could be reproduced using the attached file.

       

       

      Attachments

        1. zj_test.sql
          0.6 kB
          Jing Zhang

        Issue Links

          Activity

            People

              Jiangang Liu
              jingzhang Jing Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: