[ 
https://issues.apache.org/jira/browse/FLINK-31958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

padavan updated FLINK-31958:
----------------------------
    Description: 
Hello i have a Model with many many fields, example:

 

 

{{}}
{code:java}
public class UserModel { public int userId; public int count; public int zip; 
public LocalDateTime dt; public LocalDateTime wStart; public LocalDateTime 
wEnd; }{code}
{{}}

 

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}
.select($("userId"), $("count").sum().as("count"));
DataStream<UserModel> dataStream = te.toDataStream(win, UserModel.class);{code}
{{}}

 

 

*Excepted:* 

Remove rule valdiation "Different number of columns.". If a column is not 
selected it is initialized by default(T) / Null

  was:
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


> 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
>            Priority: Major
>
> Hello i have a Model with many many fields, example:
>  
>  
> {{}}
> {code:java}
> public class UserModel { public int userId; public int count; public int zip; 
> public LocalDateTime dt; public LocalDateTime wStart; public LocalDateTime 
> wEnd; }{code}
> {{}}
>  
> 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}
> .select($("userId"), $("count").sum().as("count"));
> DataStream<UserModel> dataStream = te.toDataStream(win, 
> UserModel.class);{code}
> {{}}
>  
>  
> *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)

Reply via email to