[jira] [Comment Edited] (FLINK-24306) group by index throw SqlValidatorException
[ https://issues.apache.org/jira/browse/FLINK-24306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416576#comment-17416576 ] zlzhang0122 edited comment on FLINK-24306 at 9/17/21, 10:09 AM: [~jark] I have linked the Calcite issue but they thought that it have been solved while I tried to set this config in FlinkSqlConformance#isGroupByOrdinal(), it didn't worked. I'm trying to have a deep dig on it. was (Author: zlzhang0122): [~jark] I have linked the Calcite issue but they thought that it have been solved while I tried to set this config in FlinkSqlConformance#isGroupByAlias(), it didn't worked. I'm trying to have a deep dig on it. > group by index throw SqlValidatorException > -- > > Key: FLINK-24306 > URL: https://issues.apache.org/jira/browse/FLINK-24306 > Project: Flink > Issue Type: Bug > Components: Table SQL / API >Affects Versions: 1.12.2, 1.13.1 >Reporter: zlzhang0122 >Priority: Major > Fix For: 1.15.0 > > Attachments: calcite.png, sql_exception.png > > > We create a table using following DDL: > {code:java} > create table if not exists datagen_source ( > id int, > name string, > sex string, > age int, > birthday string, > proc_time as proctime() > ) with ( > 'connector' = 'datagen', > 'rows-per-second' = '1', > 'fields.id.kind' = 'random', > 'fields.id.min' = '1', > 'fields.id.max' = '200');{code} > When we running > {code:java} > select id, count(*) from datagen_source group by id;{code} > Everything will be fine.But if we running > {code:java} > select id, count(*) from datagen_source group by 1;{code} > We will get a SqlValidatorException like this: > !sql_exception.png! > Since MySql\Hive\Spark SQL\etc. all support group by index, I think Flink > also should support this syntax too. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (FLINK-24306) group by index throw SqlValidatorException
[ https://issues.apache.org/jira/browse/FLINK-24306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416576#comment-17416576 ] zlzhang0122 edited comment on FLINK-24306 at 9/17/21, 9:35 AM: --- [~jark] I have linked the Calcite issue but they thought that it have been solved while I tried to set this config in FlinkSqlConformance#isGroupByAlias(), it didn't worked. I'm trying to have a deep dig on it. was (Author: zlzhang0122): [~jark] I have linked the Calcite issue but they thought that it have been solved while I tried to set this config in FlinkSqlConformance#isGroupByAlias(), but it didn't worked. I'm trying to have a deep dig on it. > group by index throw SqlValidatorException > -- > > Key: FLINK-24306 > URL: https://issues.apache.org/jira/browse/FLINK-24306 > Project: Flink > Issue Type: Bug > Components: Table SQL / API >Affects Versions: 1.12.2, 1.13.1 >Reporter: zlzhang0122 >Priority: Major > Fix For: 1.15.0 > > Attachments: calcite.png, sql_exception.png > > > We create a table using following DDL: > {code:java} > create table if not exists datagen_source ( > id int, > name string, > sex string, > age int, > birthday string, > proc_time as proctime() > ) with ( > 'connector' = 'datagen', > 'rows-per-second' = '1', > 'fields.id.kind' = 'random', > 'fields.id.min' = '1', > 'fields.id.max' = '200');{code} > When we running > {code:java} > select id, count(*) from datagen_source group by id;{code} > Everything will be fine.But if we running > {code:java} > select id, count(*) from datagen_source group by 1;{code} > We will get a SqlValidatorException like this: > !sql_exception.png! > Since MySql\Hive\Spark SQL\etc. all support group by index, I think Flink > also should support this syntax too. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (FLINK-24306) group by index throw SqlValidatorException
[ https://issues.apache.org/jira/browse/FLINK-24306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416576#comment-17416576 ] zlzhang0122 edited comment on FLINK-24306 at 9/17/21, 9:34 AM: --- [~jark] I have linked the Calcite issue but they thought that it have been solved while I tried to set this config in FlinkSqlConformance#isGroupByAlias(), but it didn't worked. I'm trying to have a deep dig on it. was (Author: zlzhang0122): [~jark] I have linked the Calcite issue but they thought that it have been solved but I tried to set this config in FlinkSqlConformance#isGroupByAlias(), but it didn't worked. I'm trying to have a deep dig on it. > group by index throw SqlValidatorException > -- > > Key: FLINK-24306 > URL: https://issues.apache.org/jira/browse/FLINK-24306 > Project: Flink > Issue Type: Bug > Components: Table SQL / API >Affects Versions: 1.12.2, 1.13.1 >Reporter: zlzhang0122 >Priority: Major > Fix For: 1.15.0 > > Attachments: calcite.png, sql_exception.png > > > We create a table using following DDL: > {code:java} > create table if not exists datagen_source ( > id int, > name string, > sex string, > age int, > birthday string, > proc_time as proctime() > ) with ( > 'connector' = 'datagen', > 'rows-per-second' = '1', > 'fields.id.kind' = 'random', > 'fields.id.min' = '1', > 'fields.id.max' = '200');{code} > When we running > {code:java} > select id, count(*) from datagen_source group by id;{code} > Everything will be fine.But if we running > {code:java} > select id, count(*) from datagen_source group by 1;{code} > We will get a SqlValidatorException like this: > !sql_exception.png! > Since MySql\Hive\Spark SQL\etc. all support group by index, I think Flink > also should support this syntax too. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (FLINK-24306) group by index throw SqlValidatorException
[ https://issues.apache.org/jira/browse/FLINK-24306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416000#comment-17416000 ] zlzhang0122 edited comment on FLINK-24306 at 9/16/21, 9:44 AM: --- I have examined the latest apache calcite and found that it also couldn't support this syntax, I think this problem is be produced by apache calcite and I have created a ticket for calcite. was (Author: zlzhang0122): I have examined the latest apache calcite and found that it also couldn't support this syntax, I think this problem was produced by apache calcite and I have created a ticket for calcite. > group by index throw SqlValidatorException > -- > > Key: FLINK-24306 > URL: https://issues.apache.org/jira/browse/FLINK-24306 > Project: Flink > Issue Type: Bug > Components: Table SQL / API >Affects Versions: 1.12.2, 1.13.1 >Reporter: zlzhang0122 >Priority: Major > Fix For: 1.15.0 > > Attachments: calcite.png, sql_exception.png > > > We create a table using following DDL: > {code:java} > create table if not exists datagen_source ( > id int, > name string, > sex string, > age int, > birthday string, > proc_time as proctime() > ) with ( > 'connector' = 'datagen', > 'rows-per-second' = '1', > 'fields.id.kind' = 'random', > 'fields.id.min' = '1', > 'fields.id.max' = '200');{code} > When we running > {code:java} > select id, count(*) from datagen_source group by id;{code} > Everything will be fine.But if we running > {code:java} > select id, count(*) from datagen_source group by 1;{code} > We will get a SqlValidatorException like this: > !sql_exception.png! > Since MySql\Hive\Spark SQL\etc. all support group by index, I think Flink > also should support this syntax too. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (FLINK-24306) group by index throw SqlValidatorException
[ https://issues.apache.org/jira/browse/FLINK-24306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416000#comment-17416000 ] zlzhang0122 edited comment on FLINK-24306 at 9/16/21, 9:16 AM: --- I have examined the latest apache calcite and found that it also couldn't support this syntax, I think this problem was produced by apache calcite and I have created a ticket for calcite. was (Author: zlzhang0122): I have examined the latest apache calcite and found that it also couldn't support this syntax, I think this problem was produced by apache calcite and I have create a ticket for calcite. > group by index throw SqlValidatorException > -- > > Key: FLINK-24306 > URL: https://issues.apache.org/jira/browse/FLINK-24306 > Project: Flink > Issue Type: Bug > Components: Table SQL / API >Affects Versions: 1.12.2, 1.13.1 >Reporter: zlzhang0122 >Priority: Major > Fix For: 1.15.0 > > Attachments: calcite.png, sql_exception.png > > > We create a table using following DDL: > {code:java} > create table if not exists datagen_source ( > id int, > name string, > sex string, > age int, > birthday string, > proc_time as proctime() > ) with ( > 'connector' = 'datagen', > 'rows-per-second' = '1', > 'fields.id.kind' = 'random', > 'fields.id.min' = '1', > 'fields.id.max' = '200');{code} > When we running > {code:java} > select id, count(*) from datagen_source group by id;{code} > Everything will be fine.But if we running > {code:java} > select id, count(*) from datagen_source group by 1;{code} > We will get a SqlValidatorException like this: > !sql_exception.png! > Since MySql\Hive\Spark SQL\etc. all support group by index, I think Flink > also should support this syntax too. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (FLINK-24306) group by index throw SqlValidatorException
[ https://issues.apache.org/jira/browse/FLINK-24306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416000#comment-17416000 ] zlzhang0122 edited comment on FLINK-24306 at 9/16/21, 9:16 AM: --- I have examined the latest apache calcite and found that it also couldn't support this syntax, I think this problem was produced by apache calcite and I have create a ticket for calcite. was (Author: zlzhang0122): I have examined the latest apache calcite and found that it also couldn't support this syntax, I think this problem is produce by apache calcite and I have create a ticket for calcite. > group by index throw SqlValidatorException > -- > > Key: FLINK-24306 > URL: https://issues.apache.org/jira/browse/FLINK-24306 > Project: Flink > Issue Type: Bug > Components: Table SQL / API >Affects Versions: 1.12.2, 1.13.1 >Reporter: zlzhang0122 >Priority: Major > Fix For: 1.15.0 > > Attachments: calcite.png, sql_exception.png > > > We create a table using following DDL: > {code:java} > create table if not exists datagen_source ( > id int, > name string, > sex string, > age int, > birthday string, > proc_time as proctime() > ) with ( > 'connector' = 'datagen', > 'rows-per-second' = '1', > 'fields.id.kind' = 'random', > 'fields.id.min' = '1', > 'fields.id.max' = '200');{code} > When we running > {code:java} > select id, count(*) from datagen_source group by id;{code} > Everything will be fine.But if we running > {code:java} > select id, count(*) from datagen_source group by 1;{code} > We will get a SqlValidatorException like this: > !sql_exception.png! > Since MySql\Hive\Spark SQL\etc. all support group by index, I think Flink > also should support this syntax too. > -- This message was sent by Atlassian Jira (v8.3.4#803005)