[ https://issues.apache.org/jira/browse/CALCITE-2970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17094107#comment-17094107 ]
Xiening Dai commented on CALCITE-2970: -------------------------------------- [~hyuan] [~julianhyde] I've updated the PR based on feedback from you. Please take a look. The fix does improve the planning performance significantly. I use JDBCTest.testJoinManyWay() as an example, the number of rule firing is reduced ~1/3. Before fix - {noformat}Rules Attempts Time (us) ProjectMergeRule:force_mode 75,853 2,328,906 JoinPushThroughJoinRule:left 5,839 874,298 JoinPushThroughJoinRule:right 5,839 5,529 EnumerableProjectRule(in:NONE,out:ENUMERABLE) 2,592 494,787 AggregateProjectMergeRule 1,722 78,013 AggregatePullUpConstantsRule 1,402 12,073 JoinPushExpressionsRule 755 32,017 FilterJoinRule:FilterJoinRule:no-filter 755 11,322 ProjectFilterTransposeRule 366 10,986 EnumerableMergeJoinRule(in:NONE,out:ENUMERABLE) 364 489,524 EnumerableJoinRule(in:NONE,out:ENUMERABLE) 364 123,017 JoinCommuteRule 356 336,175 FilterJoinRule:FilterJoinRule:filter 67 208,296 FilterProjectTransposeRule 64 26,336 SortRemoveConstantKeysRule 48 2,499 SortRemoveRule 48 913 PruneSortLimit0 48 58 EnumerableLimitRule 48 23 ReduceExpressionsRule(Filter) 44 34,105 EnumerableFilterRule(in:NONE,out:ENUMERABLE) 44 9,386 EnumerableAggregateRule(in:NONE,out:ENUMERABLE) 37 20,525 AggregateExpandDistinctAggregatesRule 37 73 ExpandConversionRule 34 16,408 EnumerableSortRule(in:NONE,out:ENUMERABLE) 25 20,265 BindableTableScanRule 1 479 EnumerableTableScanRule(in:NONE,out:ENUMERABLE) 1 258 EnumerableInterpreterRule(in:BINDABLE,out:ENUMERABLE) 1 257 * Total 96,754 5,136,528{noformat} After fix - {noformat}Rules Attempts Time (us) ProjectMergeRule:force_mode 57,200 2,302,027 EnumerableProjectRule(in:NONE,out:ENUMERABLE) 1,898 368,744 AggregateProjectMergeRule 1,105 60,956 AggregatePullUpConstantsRule 871 9,786 JoinPushThroughJoinRule:left 771 138,373 JoinPushThroughJoinRule:right 771 18,638 ProjectFilterTransposeRule 368 10,672 JoinPushExpressionsRule 316 17,998 FilterJoinRule:FilterJoinRule:no-filter 316 5,022 EnumerableJoinRule(in:NONE,out:ENUMERABLE) 108 65,576 EnumerableMergeJoinRule(in:NONE,out:ENUMERABLE) 108 33,583 JoinCommuteRule 101 59,368 FilterJoinRule:FilterJoinRule:filter 67 103,464 FilterProjectTransposeRule 64 27,344 ReduceExpressionsRule(Filter) 44 28,505 EnumerableFilterRule(in:NONE,out:ENUMERABLE) 44 12,478 EnumerableAggregateRule(in:NONE,out:ENUMERABLE) 24 3,295 AggregateExpandDistinctAggregatesRule 24 41 ExpandConversionRule 16 12,361 SortRemoveConstantKeysRule 14 638 SortRemoveRule 14 234 PruneSortLimit0 14 11 EnumerableLimitRule 14 1 BindableTableScanRule 1 522 EnumerableTableScanRule(in:NONE,out:ENUMERABLE) 1 303 EnumerableInterpreterRule(in:BINDABLE,out:ENUMERABLE) 1 216 * Total 64,275 3,280,156{noformat} > Performance issue when enabling abstract converter for EnumerableConvention > --------------------------------------------------------------------------- > > Key: CALCITE-2970 > URL: https://issues.apache.org/jira/browse/CALCITE-2970 > Project: Calcite > Issue Type: Bug > Components: core > Reporter: Haisheng Yuan > Priority: Major > Labels: pull-request-available > Time Spent: 13.5h > Remaining Estimate: 0h > > If we enable the use of abstract converter for {{EnumerableConvention}}, by > making {{useAbstractConvertersForConversion}} return true, > {{JDBCTest.testJoinManyWay}} will not complete. -- This message was sent by Atlassian Jira (v8.3.4#803005)