Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGNITE-21558 Sql. Remove ExecutionContext dependency from ExpressionFactory #4959

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

korlov42
Copy link
Contributor

@korlov42 korlov42 commented Dec 23, 2024

https://issues.apache.org/jira/browse/IGNITE-21558

To be sure this patch doesn't affect performance, I've run a few benchmarks. Results as follow:

Before
Benchmark                          (clusterSize)  (fsync)                                    Mode  Cnt    Score   Error  Units
SelectBenchmark.sqlGet                         1    false                                    avgt   20    5.604 ± 0.098  us/op

Benchmark                          (clusterSize)  (fsync)  (partitionCount)  (replicaCount)  Mode  Cnt    Score   Error  Units
InsertBenchmark.sqlInlinedInsert               1    false                24               1  avgt   20  134.026 ± 3.023  us/op
InsertBenchmark.sqlPreparedInsert              1    false                24               1  avgt   20   44.318 ± 8.932  us/op


After 
Benchmark                          (clusterSize)  (fsync)                                    Mode  Cnt    Score   Error  Units
SelectBenchmark.sqlGet                         1    false                                    avgt   20    5.639 ± 0.087  us/op

Benchmark                          (clusterSize)  (fsync)  (partitionCount)  (replicaCount)  Mode  Cnt    Score   Error  Units
InsertBenchmark.sqlInlinedInsert               1    false                24               1  avgt   20  130.579 ± 1.622  us/op
InsertBenchmark.sqlPreparedInsert              1    false                24               1  avgt   20   43.550 ± 6.111  us/op

Thank you for submitting the pull request.

To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:

The Review Checklist

  • Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - There is a single JIRA ticket related to the pull request.
    - The web-link to the pull request is attached to the JIRA ticket.
    - The JIRA ticket has the Patch Available state.
    - The description of the JIRA ticket explains WHAT was made, WHY and HOW.
    - The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • Design: new code conforms with the design principles of the components it is added to.
  • Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes

@korlov42 korlov42 force-pushed the ignite-21558 branch 3 times, most recently from 7f1a200 to 7f0ec91 Compare December 24, 2024 10:23
@@ -267,11 +265,13 @@ private final class AccumulatorWrapperImpl implements AccumulatorWrapper<RowT> {
private final boolean distinct;

AccumulatorWrapperImpl(
RowHandler<RowT> handler,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If captured context is no longer used, can this class be static?

@@ -57,7 +57,7 @@
* AccumulatorsFactory.
* TODO Documentation https://issues.apache.org/jira/browse/IGNITE-15859
*/
public class AccumulatorsFactory<RowT> implements Supplier<List<AccumulatorWrapper<RowT>>> {
public class AccumulatorsFactory<RowT> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fix javadoc and remove TODO?)

@@ -142,26 +142,24 @@ private static Function<Object, Object> compileCast(IgniteTypeFactory typeFactor
* TODO Documentation https://issues.apache.org/jira/browse/IGNITE-15859
*/
public AccumulatorsFactory(
ExecutionContext<RowT> ctx,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove TODO?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants