You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "padavan (Jira)" <ji...@apache.org> on 2023/04/27 10:39:00 UTC
[jira] [Created] (FLINK-31958) Table to DataStream allow partial fields
padavan created FLINK-31958:
-------------------------------
Summary: Table to DataStream allow partial fields
Key: FLINK-31958
URL: https://issues.apache.org/jira/browse/FLINK-31958
Project: Flink
Issue Type: Improvement
Components: API / DataStream, Table SQL / API
Reporter: padavan
Hello i have a Model with many many fields, example:
{{}}
{code:java}
{code}
{{public class UserModel { }}
{{public int userId; }}
{{public int count; }}
{{public int zip;}}
{{public LocalDateTime dt; }}
{{public LocalDateTime wStart; }}
{{public LocalDateTime wEnd; }}}
I work with Table API, select fields and convert Table to DataStream by Model. But problem what *i should select all fields if I don't even need it* or i will get exception
{quote}Column types of query result and sink for do not match. Cause: Different number of columns.
{quote}
And I just have to substitute fake data for the plugs...
I want simple use with only fields wich i have selected like:
{{}}
{code:java}
{code}
{{.select($("userId"), $("count").sum().as("count")); }}
{{DataStream<UserModel> dataStream = te.toDataStream(win, UserModel.class);}}
*Excepted:*
Remove rule valdiation "Different number of columns.". If a column is not selected it is initialized by default(T) / Null
--
This message was sent by Atlassian Jira
(v8.20.10#820010)