You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jesus Camacho Rodriguez (Jira)" <ji...@apache.org> on 2021/10/05 19:52:00 UTC
[jira] [Resolved] (CALCITE-4546) Change metadata dispatch to avoid
registration of all RelNode subtypes
[ https://issues.apache.org/jira/browse/CALCITE-4546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesus Camacho Rodriguez resolved CALCITE-4546.
----------------------------------------------
Resolution: Fixed
Fixed in [fbbdf46|https://github.com/apache/calcite/commit/fbbdf465df46b4e6f9863d7d1dfdcb19a43f2032]. Thanks [~jamesstarr]!
> Change metadata dispatch to avoid registration of all RelNode subtypes
> ----------------------------------------------------------------------
>
> Key: CALCITE-4546
> URL: https://issues.apache.org/jira/browse/CALCITE-4546
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: James Starr
> Assignee: James Starr
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
> Using JdbcTest.testJoinFiveWay, I ran the query six times then I took the last 3 results as reported by intellij. I then repeated this 3 times.
> After bench marking Janino, my prototype and using legacy java reflections, I found:
> | |Janino||*Prototype*||*java reflection*||
> |Average|326.4444444|315.5555556|1525.888889|
> |Standard Deviation|27.12983188|14.75729575|75.8476177|
> The prototype was a static code with out caching or cycle detection. I latter added cycle detection and caching, but the results were with in one standard deviation. So I didn't not follow up further.
> I was doing the dispatch with instance of instead of scanning an array of known classes.
> {code:java}
> if(node instanceof ...){
> return handler.call((...) node);
> } else if(node instanceof ...) {
> return handler.call((...) node);
> }....
> {code}
> If janino compiler dispatch was changed to use instanceof, it would remove the requirement know all relnode subtypes.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)