rename error in flink sql

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

rename error in flink sql

大森林

I'm learning "select"from


my code is:

the error I got is:
 total is not found in PojoType<Order, fields = [amount: Integer, product: String, user: Long]>

It's strange that the rename name should be found in pojo.

Could anyone help me?
thanks for your help



Reply | Threaded
Open this post in threaded view
|

Re: rename error in flink sql

Andrey Zagrebin-5
Hi,

I am not an SQL expert but I would not expect the original POJO to match the new row with the renamed field.
Maybe Timo or Dawid have to add something.

Best,
Andrey

On Tue, Oct 20, 2020 at 4:56 PM 大森林 <[hidden email]> wrote:

I'm learning "select"from


my code is:

the error I got is:
 total is not found in PojoType<Order, fields = [amount: Integer, product: String, user: Long]>

It's strange that the rename name should be found in pojo.

Could anyone help me?
thanks for your help



Reply | Threaded
Open this post in threaded view
|

回复: rename error in flink sql

大森林

Thanks for your replies.

um....
Could you tell me where I am wrong in this code?
I'm weak in Java.

The pojo is copied from flink official example:


Thanks for your help~!


------------------ 原始邮件 ------------------
发件人: "Andrey Zagrebin" <[hidden email]>;
发送时间: 2020年10月20日(星期二) 晚上11:58
收件人: "大森林"<[hidden email]>;
抄送: "user"<[hidden email]>;"dwysakowicz"<[hidden email]>;"twalthr"<[hidden email]>;
主题: Re: rename error in flink sql

Hi,

I am not an SQL expert but I would not expect the original POJO to match the new row with the renamed field.
Maybe Timo or Dawid have to add something.

Best,
Andrey

On Tue, Oct 20, 2020 at 4:56 PM 大森林 <[hidden email]> wrote:

I'm learning "select"from


my code is:

the error I got is:
 total is not found in PojoType<Order, fields = [amount: Integer, product: String, user: Long]>

It's strange that the renamed field should be found in pojo.

Could anyone help me?
thanks for your help



Reply | Threaded
Open this post in threaded view
|

回复: rename error in flink sql

大森林
Thanks for your help,I have finally modify it and solve it by luck.

but new relevent question occur:
Could you please have a look at it?

I know JIRA is for bug only,but the email will destroy the table I posted,
forgive me for posting in JIRA and close it if you think it's not a bug.

Thanks for your help


------------------ 原始邮件 ------------------
发件人: "大森林" <[hidden email]>;
发送时间: 2020年10月21日(星期三) 上午10:54
收件人: "Andrey Zagrebin"<[hidden email]>;
抄送: "user"<[hidden email]>;"dwysakowicz"<[hidden email]>;"twalthr"<[hidden email]>;
主题: 回复: rename error in flink sql


Thanks for your replies.

um....
Could you tell me where I am wrong in this code?
I'm weak in Java.

The pojo is copied from flink official example:


Thanks for your help~!


------------------ 原始邮件 ------------------
发件人: "Andrey Zagrebin" <[hidden email]>;
发送时间: 2020年10月20日(星期二) 晚上11:58
收件人: "大森林"<[hidden email]>;
抄送: "user"<[hidden email]>;"dwysakowicz"<[hidden email]>;"twalthr"<[hidden email]>;
主题: Re: rename error in flink sql

Hi,

I am not an SQL expert but I would not expect the original POJO to match the new row with the renamed field.
Maybe Timo or Dawid have to add something.

Best,
Andrey

On Tue, Oct 20, 2020 at 4:56 PM 大森林 <[hidden email]> wrote:

I'm learning "select"from


my code is:

the error I got is:
 total is not found in PojoType<Order, fields = [amount: Integer, product: String, user: Long]>

It's strange that the renamed field should be found in pojo.

Could anyone help me?
thanks for your help



Reply | Threaded
Open this post in threaded view
|

Re: 回复: rename error in flink sql

Timo Walther
Hi,

sorry for the late reply. I the problem was in the
`tEnv.toAppendStream(result,Order.class).print();` right?

You can also find a new example here:

https://github.com/apache/flink/blob/master/flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/basics/GettingStartedExample.java

We are in the process of adding more example code for beginners.

I will reply to your JIRA issue in the comments.

Regards,
Timo


On 21.10.20 07:17, 大森林 wrote:

> Thanks for your help,I have finally modify it and solve it by luck.
>
> but new relevent question occur:
> https://issues.apache.org/jira/browse/FLINK-19746
> Could you please have a look at it?
>
> *I know JIRA is for bug only,but the email will destroy the table I posted,*
> *forgive me for posting in JIRA and close it if you think it's not a bug.*
>
> Thanks for your help
>
>
> ------------------ 原始邮件 ------------------
> *发件人:* "大森林" <[hidden email]>;
> *发送时间:* 2020年10月21日(星期三) 上午10:54
> *收件人:* "Andrey Zagrebin"<[hidden email]>;
> *抄送:* "user"<[hidden email]>;"dwysakowicz"
> <[hidden email]>;"twalthr"<[hidden email]>;
> *主题:* 回复: rename error in flink sql
>
>
> Thanks for your replies.
>
> um....
> Could you tell me *where I am wrong in this code?*
> *I'm weak in Java.*
> *
> *
> The pojo is copied from flink official example:
> https://paste.ubuntu.com/p/kRKxwBpSVK/
>
> the test code is:
> https://paste.ubuntu.com/p/yVYhZqMNq7/
>
> Thanks for your help~!
>
>
> ------------------ 原始邮件 ------------------
> *发件人:* "Andrey Zagrebin" <[hidden email]>;
> *发送时间:* 2020年10月20日(星期二) 晚上11:58
> *收件人:* "大森林"<[hidden email]>;
> *抄送:* "user"<[hidden email]>;"dwysakowicz"
> <[hidden email]>;"twalthr"<[hidden email]>;
> *主题:* Re: rename error in flink sql
>
> Hi,
>
> I am not an SQL expert but I would not expect the original POJO to match
> the new row with the renamed field.
> Maybe Timo or Dawid have to add something.
>
> Best,
> Andrey
>
> On Tue, Oct 20, 2020 at 4:56 PM 大森林 <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>
>     I'm learning "select"from
>     official document
>     <https://ci.apache.org/projects/flink/flink-docs-stable/dev/table/tableApi.html>
>
>
>     my code is:
>     https://paste.ubuntu.com/p/yVYhZqMNq7/
>
>     the error I got is:
>       total is not found in PojoType<Order, fields = [amount: Integer,
>     product: String, user: Long]>
>
>     It's strange that the*renamed field should be found in pojo.*
>     *
>     *
>     *Could anyone help me?*
>     *thanks for your help*
>
>
>