forked from apache/horaedb
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: add datafusion default optimizer rules (apache#1147)
- Loading branch information
1 parent
50b8f77
commit 965327a
Showing
7 changed files
with
138 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
CREATE TABLE `issue_1087` ( | ||
`name` string TAG NULL, | ||
`value` double NOT NULL, | ||
`t` timestamp NOT NULL, | ||
timestamp KEY (t)) | ||
ENGINE=Analytic with (enable_ttl='false'); | ||
|
||
affected_rows: 0 | ||
|
||
explain verbose select * from issue_1087; | ||
|
||
plan_type,plan, | ||
String("initial_logical_plan"),String("Projection: issue_1087.tsid, issue_1087.t, issue_1087.name, issue_1087.value\n TableScan: issue_1087"), | ||
String("logical_plan after ceresdb_type_conversion"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after inline_table_scan"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after type_coercion"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after count_wildcard_rule"),String("SAME TEXT AS ABOVE"), | ||
String("analyzed_logical_plan"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after simplify_expressions"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after unwrap_cast_in_comparison"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after replace_distinct_aggregate"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after eliminate_join"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after decorrelate_predicate_subquery"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after scalar_subquery_to_join"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after extract_equijoin_predicate"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after simplify_expressions"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after merge_projection"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after rewrite_disjunctive_predicate"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after eliminate_duplicated_expr"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after eliminate_filter"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after eliminate_cross_join"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after common_sub_expression_eliminate"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after eliminate_limit"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after propagate_empty_relation"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after filter_null_join_keys"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after eliminate_outer_join"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after push_down_limit"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after push_down_filter"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after single_distinct_aggregation_to_group_by"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after simplify_expressions"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after unwrap_cast_in_comparison"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after common_sub_expression_eliminate"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after push_down_projection"),String("Projection: issue_1087.tsid, issue_1087.t, issue_1087.name, issue_1087.value\n TableScan: issue_1087 projection=[tsid, t, name, value]"), | ||
String("logical_plan after eliminate_projection"),String("TableScan: issue_1087 projection=[tsid, t, name, value]"), | ||
String("logical_plan after push_down_limit"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after influx_regex_to_datafusion_regex"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after handle_gap_fill"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after simplify_expressions"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after unwrap_cast_in_comparison"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after replace_distinct_aggregate"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after eliminate_join"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after decorrelate_predicate_subquery"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after scalar_subquery_to_join"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after extract_equijoin_predicate"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after simplify_expressions"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after merge_projection"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after rewrite_disjunctive_predicate"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after eliminate_duplicated_expr"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after eliminate_filter"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after eliminate_cross_join"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after common_sub_expression_eliminate"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after eliminate_limit"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after propagate_empty_relation"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after filter_null_join_keys"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after eliminate_outer_join"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after push_down_limit"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after push_down_filter"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after single_distinct_aggregation_to_group_by"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after simplify_expressions"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after unwrap_cast_in_comparison"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after common_sub_expression_eliminate"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after push_down_projection"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after eliminate_projection"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after push_down_limit"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after influx_regex_to_datafusion_regex"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan after handle_gap_fill"),String("SAME TEXT AS ABOVE"), | ||
String("logical_plan"),String("TableScan: issue_1087 projection=[tsid, t, name, value]"), | ||
String("initial_physical_plan"),String("ScanTable: table=issue_1087, parallelism=8\n"), | ||
String("physical_plan after aggregate_statistics"),String("SAME TEXT AS ABOVE"), | ||
String("physical_plan after join_selection"),String("SAME TEXT AS ABOVE"), | ||
String("physical_plan after PipelineFixer"),String("SAME TEXT AS ABOVE"), | ||
String("physical_plan after repartition"),String("SAME TEXT AS ABOVE"), | ||
String("physical_plan after EnforceDistribution"),String("SAME TEXT AS ABOVE"), | ||
String("physical_plan after CombinePartialFinalAggregate"),String("SAME TEXT AS ABOVE"), | ||
String("physical_plan after EnforceSorting"),String("SAME TEXT AS ABOVE"), | ||
String("physical_plan after coalesce_batches"),String("SAME TEXT AS ABOVE"), | ||
String("physical_plan after PipelineChecker"),String("SAME TEXT AS ABOVE"), | ||
String("physical_plan"),String("ScanTable: table=issue_1087, parallelism=8\n"), | ||
|
||
|
||
DROP TABLE `issue_1087`; | ||
|
||
affected_rows: 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CREATE TABLE `issue_1087` ( | ||
`name` string TAG NULL, | ||
`value` double NOT NULL, | ||
`t` timestamp NOT NULL, | ||
timestamp KEY (t)) | ||
ENGINE=Analytic with (enable_ttl='false'); | ||
|
||
|
||
-- Check which optimizer rules we are using now | ||
explain verbose select * from issue_1087; | ||
|
||
DROP TABLE `issue_1087`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters