Open MingyuGuan opened 5 years ago
Files under calcite/target
are the outputs of compiler, which are NOT necessary to be put into the PR?
Files under
calcite/target
are the outputs of compiler, which are NOT necessary to be put into the PR?
Removed. Thanks.
table.json example:
SimpleTestTable.java:
Add PushProjectIntoTableScanRule.
Inside HuskyLogicalTableScan, we maintain a "fields" member to record project fields.
PushProjectIntoTableScanRule matches by operand(HuskyLogicalCalc.class, operand(HuskyLogicalTableScan.class, none()).
If HuskyLogicalCalc is trivial (the transformed program merely returns its input and doesn't exist filter), we drop calc and transform to HuskyLogicalTableScan; else, transform to new calc.
(NEW)Add PushFilterIntoTableScanRule.
Inside HuskyLogicalTableScan, we maintain a "condition" member to record filtering condition.
The "condition" should be conjunctive normal form, e.g. "(a AND b) OR c" will be converted to "(a OR c) AND (b OR c)".
To computer cost of HuskyTableScan, need to consider factors of selectedFields(Project) and selectivity of rows(Filter).