-
Notifications
You must be signed in to change notification settings - Fork 13k
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-6841][table]Using TableSourceTable for both Stream and Batch #4061
Conversation
f17cbd5
to
337229a
Compare
I'm not sure about this change. A batch table source would be able to create a time attribute if it implements |
Hi @twalthr I think |
@@ -42,7 +42,7 @@ class ExternalTableSourceUtilTest { | |||
val schema = new TableSchema(Array("foo"), Array(BasicTypeInfo.INT_TYPE_INFO)) | |||
val table = ExternalCatalogTable("mock", schema) | |||
val tableSource = ExternalTableSourceUtil.fromExternalCatalogTable(table) | |||
assertTrue(tableSource.isInstanceOf[StreamTableSourceTable[_]]) | |||
assertTrue(tableSource.isInstanceOf[TableSourceTable[_]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think checking the result of fromExternalCatalogTable
is a TableSourceTable
is meaningless now (it definitely returns a TableSourceTable
). I suggest to check whether the TableSource
in the TableSourceTable
is a StreamTableSource
.
assertTrue(tableSource.tableSource.isInstanceOf[StreamTableSource[_]])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense to me. :)
@twalthr @sunjincheng121 For the following example, the SELECT overAgg(b, a) FROM T GROUP BY TUMBLE(ts, INTERVAL '2' HOUR)` |
Hi, @wuchong Thanks for your reviewing. I meant from the perspective of grammar is allow batch table source to implement the I have updated the PR. according your comment. @wuchong Thanks, |
Hi @sunjincheng121! I left a comment on the JIRA issue. Short summary: I don't think this PR is a significant improvement. I'd rather keep it as it is unless you have a good argument to convince me. Thank you, Fabian |
Thanks @fhueske, I noticed your description on the JIRA. issue. I think it's make sense to me. Because at the current time between Thanks, |
Remove
StreamTableSourceTable
, And using TableSourceTable for both Stream and Batch.General
Documentation
Tests & Build
mvn clean verify
has been executed successfully locally or a Travis build has passed