Thanks, Leonard!
I just solved this also by replacing "ROW(" with "(" from the create view
statement.
CREATE TEMPORARY VIEW `test_content_metrics_view` AS
SELECT
DATE_FORMAT(TUMBLE_ROWTIME(rowtime, INTERVAL '1' DAY), '-MM-dd'),
(
platform_id,
content_id
)
FROM cont
Do not trust the line number from sql parser exception, you should use ROW in your DDL when you declare a composite row type, try the
following:
CREATE TABLE test_content_metrics (
dt STRING NOT NULL,
`body` ROW<
`platform_id` BIGINT,
`content_id` STRING
>
) PARTITIONED BY (
Also, if I try to do an aggregate inside the ROW, I get an error. I don't
get the error if it's not wrapped in.a Row.
ROW(
SUM(view_count)
) AS body,
Caused by: org.apache.flink.table.api.SqlParserException: SQL
parse failed. Encountered "SUM" at line 8, column 5.
Was expecting one of:
Here's the full stack trace.
=> org.apache.flink.table.api.SqlParserException: SQL parse
failed. Encountered "." at line 1, column 336.
Was expecting one of:
")" ...
"," ...
org.apache.flink.table.planner.parse.CalciteParser.parse(CalciteParser.java:56)
org.apache.flin
If I remove the "TEMPORARY VIEW" and just inline the SQL, this works fine.
This seems like a bug with temporary views.
On Wed, Nov 23, 2022 at 1:38 PM Dan Hill wrote:
> Looks related to this issue.
> https://lists.apache.org/thread/1sb5bos6tjv39fh0wjkvmvht0824r4my
>
> In my case, it doesn't seem
Looks related to this issue.
https://lists.apache.org/thread/1sb5bos6tjv39fh0wjkvmvht0824r4my
In my case, it doesn't seem like it's a sink issue. Even if I change my
minicluster test to SELECT * it, it fails the same way.
CREATE TEMPORARY VIEW `test_content_metrics_view` AS
SELECT
DATE_FORMA
I upgraded to Flink v1.16.0 and I get the same error.
On Wed, Nov 23, 2022 at 9:47 AM Dan Hill wrote:
> For the error `Encountered "." at line 1, column 119.`, here are the
> confusing parts:
>
> 1. The error happens when I executed the last part of the sql query:
>
> INSERT INTO `test_content_m
For the error `Encountered "." at line 1, column 119.`, here are the
confusing parts:
1. The error happens when I executed the last part of the sql query:
INSERT INTO `test_content_metrics`
SELECT * FROM `test_content_metrics_view`
2. Line 1 column 119 doesn't exist in that SQL statement.
3. Non
I'm using Flink 1.14.4
On Wed, Nov 23, 2022, 02:28 yuxia wrote:
> Hi, Dan.
> I'm wondering what type of error you expect. IMO, I think most engines
> throw parse error in such way which tell you encounter an unexpected token.
>
> Best regards,
> Yuxia
>
> --
> *发件人: *
Hi, Dan.
I'm wondering what type of error you expect. IMO, I think most engines throw
parse error in such way which tell you encounter an unexpected token.
Best regards,
Yuxia
发件人: "Dan Hill"
收件人: "User"
发送时间: 星期三, 2022年 11 月 23日 下午 1:55:20
主题: Weird Flink SQL error
Hi. I'm hitting a
Hi Dan,
Which Flink version do you apply? I write a test case base on the code
snippet you provided and it works normally in Flink 1.17-SNAPSHOT.
Best,
Shuiqiang
Dan Hill 于2022年11月23日周三 13:55写道:
> Hi. I'm hitting an obfuscated Flink SQL parser error. Is there a way to
> get better errors for
11 matches
Mail list logo