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-5185] [Table API & SQL] Decouple BatchTableSourceScan with TableSourceTable #2921

Closed
wants to merge 5 commits into from

Conversation

beyond1920
Copy link
Contributor

The pr aims to decouple BatchTableSourceScan with TableSourceTable for further optimization, e.g, projection pushdown/filter pushdown/query pushdown. The principle is let BatchTableSourceScan directly holding TableSource instead of holding TableSourceTable.
The main changes including:

  1. change constructors of BatchScan/BatchTableSourceScan/DataSetScan
  2. Extract the logic logical of build row types based on fields types and fields name into FlinkTypeFactory class.

Copy link
Member

@wuchong wuchong left a comment

Choose a reason for hiding this comment

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

The code looks good to me.

@@ -32,18 +31,20 @@ class BatchTableSourceScan(
cluster: RelOptCluster,
traitSet: RelTraitSet,
table: RelOptTable,
rowType: RelDataType)
extends BatchScan(cluster, traitSet, table, rowType) {
val tableSource: BatchTableSource[_])
Copy link
Member

Choose a reason for hiding this comment

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

Do we have to declare this field as val ? It seems that it is only used in this class.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wuchong , Thanks for your review. For later use, the projection pushdown rule needs to get the actual tablesource of the BatchTableSourceScan, then do something on it.

Copy link
Member

Choose a reason for hiding this comment

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

Get you !

@fhueske
Copy link
Contributor

fhueske commented Dec 2, 2016

Thanks for the PR @beyond1920!
Good refactoring.
+1 to merge

@fhueske
Copy link
Contributor

fhueske commented Dec 2, 2016

merging

fhueske pushed a commit to fhueske/flink that referenced this pull request Dec 2, 2016
@asfgit asfgit closed this in 3eeb35d Dec 2, 2016
static-max pushed a commit to static-max/flink that referenced this pull request Dec 13, 2016
joseprupi pushed a commit to joseprupi/flink that referenced this pull request Feb 12, 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
5 participants