Hello all, I've realized that the previous mail had some error which caused invisible text. So I'm resending the mail below.
Hello all, I have found that the Flink sql client doesn't work with the *"partition by"* clause. Is this a bug? It's a bit weird since when I execute the same sql with *"tableEnv.executeSql(statement)"* code it works as expected. Has anyone tackled this kind of issue? I have tested in flink 1.16.1 version. Thanks in advance *- This below code only works with executeSql method in table api but not with sql client cli.* CREATE TABLE source_table ( id STRING, status STRING, type STRING, `hour` INT ) PARTITIONED BY (`hour`) WITH ( 'connector' = 'filesystem', 'path' = 'hdfs://${our_data_path}month=202307/day=20230714', 'format' = 'parquet' ); SELECT `hour` FROM source_table GROUP BY `hour`; *- This below query works both on the executeSql() method in table api and sql client query.* CREATE TABLE source_table_2 ( id STRING, status STRING, type STRING ) WITH ( 'connector' = 'filesystem', 'path' = 'hdfs://${out_data_path}/month=202307/day=20230714', 'format' = 'parquet' ); SELECT status FROM source_table_2 GROUP BY status; Best, dongwoo 2023년 7월 28일 (금) 오후 6:19, Dongwoo Kim <dongwoo7....@gmail.com>님이 작성: > Hello all, I have found that flink sql client doesn't work with "partition > by" clause. > Is this bug? It's bit weird since when I execute same sql with > tableEnv.executeSql(statement) code it works as expected. Has anyone > tackled this kind of issue? I have tested in flink 1.16.1 version. > Thanks in advance > > > - This below code only works with executeSql method in table api but not > with sql client cli. > > CREATE TABLE source_table > > ( > > id STRING, > > status STRING, > > type STRING, > > `hour` INT > > ) PARTITIONED BY (`hour`) WITH ( > > 'connector' = 'filesystem', > > 'path' = 'hdfs://${our_data_path}month=202307/day=20230714', > > 'format' = 'parquet' > > ); > > > SELECT `hour` > > FROM source_table > > GROUP BY `hour`; > > > > - This below query works both on executeSql method in table api and sql > client query. > > > CREATE TABLE source_table_2 > > ( > > id STRING, > > status STRING, > > type STRING > > ) WITH ( > > 'connector' = 'filesystem', > > 'path' = 'hdfs://${out_data_path}/month=202307/day=20230714', > > 'format' = 'parquet' > > ); > > > SELECT status > > FROM source_table_2 > > GROUP BY status; > > > > Best, > > dongwoo > > >