Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-6059] [table] Reject GenericType<Row> when converting DataSet or DataStream to Table #3546

Closed
wants to merge 1 commit into from

Conversation

fhueske
Copy link
Contributor

@fhueske fhueske commented Mar 15, 2017

When converting a DataSet<Row> or DataStream<Row> into a Table which has GenericTypeInfo<Row> type, the row is treated as atomic type. This is always a non-expected and confusing behavior.

With this change converting a DataSet<Row> or DataStream<Row> with GenericTypeInfo<Row> into a Table fails. Instead we ask for a DataSet<Row> or DataStream<Row> with proper RowTypeInfo.

@@ -498,6 +505,10 @@ abstract class TableEnvironment(val config: TableConfig) {
TableEnvironment.validateType(inputType)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do the GenericTypeInfo type check in TableEnvironment.validateType(inputType) method? If we do so, we can remove the duplicate check. What do you think?
Best,
SunJincheng

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The validateType() method is also used to check the output type, i.e., the type of a DataSet or DataStream which is created from a Table. I think we should allow GenericType<Row> in that case.
Hence, I would keep the validateType() method as it is.

@fhueske
Copy link
Contributor Author

fhueske commented Apr 27, 2017

Thanks for the review @sunjincheng121.
I will merge this fix tomorrow.

Cheers, Fabian

@asfgit asfgit closed this in c8eb55f Apr 28, 2017
@fhueske fhueske deleted the tableNoGenericRow branch April 28, 2017 23:07
fanyon pushed a commit to fanyon/flink that referenced this pull request May 11, 2017
hequn8128 pushed a commit to hequn8128/flink that referenced this pull request Jun 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants