Dandandan opened a new pull request, #14539:
URL: https://github.com/apache/datafusion/pull/14539

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   - Closes #.
   
   Todo
   - [ ] Implement outputting in batches
   - [ ] Run more benchmarks (e.g. h2o join / imdb ...)
   
   ## Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in 
the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your 
changes and offer better suggestions for fixes.  
   -->
   
   ## What changes are included in this PR?
   
   This simplifies the algorithm for traversing the chain and makes it more 
vectorizable.
   
   
   ```
   --------------------
   Benchmark tpch_sf10.json
   --------------------
   ┏━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
   ┃ Query        ┃      main ┃ join_vectorization ┃        Change ┃
   ┡━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
   │ QQuery 1     │  981.31ms │           979.09ms │     no change │
   │ QQuery 2     │  157.88ms │           160.88ms │     no change │
   │ QQuery 3     │  475.15ms │           433.32ms │ +1.10x faster │
   │ QQuery 4     │  240.46ms │           218.67ms │ +1.10x faster │
   │ QQuery 5     │  700.03ms │           670.97ms │     no change │
   │ QQuery 6     │  157.46ms │           157.25ms │     no change │
   │ QQuery 7     │ 1072.19ms │           947.74ms │ +1.13x faster │
   │ QQuery 8     │  740.30ms │           709.07ms │     no change │
   │ QQuery 9     │ 1189.08ms │          1133.91ms │     no change │
   │ QQuery 10    │  666.24ms │           646.49ms │     no change │
   │ QQuery 11    │  101.91ms │            99.33ms │     no change │
   │ QQuery 12    │  338.89ms │           337.02ms │     no change │
   │ QQuery 13    │  475.00ms │           449.67ms │ +1.06x faster │
   │ QQuery 14    │  266.15ms │           271.65ms │     no change │
   │ QQuery 15    │  442.98ms │           450.87ms │     no change │
   │ QQuery 16    │  111.29ms │           108.61ms │     no change │
   │ QQuery 17    │ 1249.82ms │          1161.85ms │ +1.08x faster │
   │ QQuery 18    │ 2052.52ms │          1730.38ms │ +1.19x faster │
   │ QQuery 19    │  464.19ms │           467.51ms │     no change │
   │ QQuery 20    │  470.89ms │           440.16ms │ +1.07x faster │
   │ QQuery 21    │ 1637.42ms │          1468.18ms │ +1.12x faster │
   │ QQuery 22    │  156.41ms │           152.52ms │     no change │
   └──────────────┴───────────┴────────────────────┴───────────────┘
   ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
   ┃ Benchmark Summary                 ┃            ┃
   ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
   │ Total Time (main)                 │ 14147.60ms │
   │ Total Time (join_vectorization)   │ 13195.16ms │
   │ Average Time (main)               │   643.07ms │
   │ Average Time (join_vectorization) │   599.78ms │
   │ Queries Faster                    │          8 │
   │ Queries Slower                    │          0 │
   │ Queries with No Change            │         14 │
   └───────────────────────────────────┴────────────┘
   
   --------------------
   Benchmark tpch_mem_sf10.json
   --------------------
   ┏━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
   ┃ Query        ┃      main ┃ join_vectorization ┃        Change ┃
   ┡━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
   │ QQuery 1     │  770.46ms │           760.22ms │     no change │
   │ QQuery 2     │  125.30ms │           104.64ms │ +1.20x faster │
   │ QQuery 3     │  259.14ms │           254.63ms │     no change │
   │ QQuery 4     │  134.04ms │           140.24ms │     no change │
   │ QQuery 5     │  525.49ms │           516.04ms │     no change │
   │ QQuery 6     │   45.93ms │            46.70ms │     no change │
   │ QQuery 7     │ 1079.09ms │           939.40ms │ +1.15x faster │
   │ QQuery 8     │  336.17ms │           323.87ms │     no change │
   │ QQuery 9     │  881.10ms │           788.30ms │ +1.12x faster │
   │ QQuery 10    │  406.44ms │           393.63ms │     no change │
   │ QQuery 11    │   94.73ms │            84.03ms │ +1.13x faster │
   │ QQuery 12    │  280.55ms │           260.73ms │ +1.08x faster │
   │ QQuery 13    │  292.29ms │           306.22ms │     no change │
   │ QQuery 14    │   47.03ms │            48.22ms │     no change │
   │ QQuery 15    │  137.05ms │           136.06ms │     no change │
   │ QQuery 16    │   94.72ms │            83.67ms │ +1.13x faster │
   │ QQuery 17    │  910.07ms │           879.16ms │     no change │
   │ QQuery 18    │ 3759.48ms │          3580.36ms │     no change │
   │ QQuery 19    │  183.15ms │           176.81ms │     no change │
   │ QQuery 20    │  242.99ms │           224.49ms │ +1.08x faster │
   │ QQuery 21    │ 1582.68ms │          1268.37ms │ +1.25x faster │
   │ QQuery 22    │   95.75ms │           100.18ms │     no change │
   └──────────────┴───────────┴────────────────────┴───────────────┘
   ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
   ┃ Benchmark Summary                 ┃            ┃
   ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
   │ Total Time (main)                 │ 12283.64ms │
   │ Total Time (join_vectorization)   │ 11415.99ms │
   │ Average Time (main)               │   558.35ms │
   │ Average Time (join_vectorization) │   518.91ms │
   │ Queries Faster                    │          8 │
   │ Queries Slower                    │          0 │
   │ Queries with No Change            │         14 │
   └───────────────────────────────────┴────────────┘
   
   ````
   
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   ## Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   
   ## Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api 
change` label.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to