Skip to content

Re-design for ShardingSphere groovy expr#25509

Merged
terrymanu merged 2 commits into
apache:masterfrom
linghengqian:redesign-groovy
May 8, 2023
Merged

Re-design for ShardingSphere groovy expr#25509
terrymanu merged 2 commits into
apache:masterfrom
linghengqian:redesign-groovy

Conversation

@linghengqian

@linghengqian linghengqian commented May 7, 2023

Copy link
Copy Markdown
Member

Fixes #25184.

Changes proposed in this pull request:

  • Add the shardingsphere-infra-expr module for put all groovy related logics here.
  • Add the shardingsphere-infra-expr-spi sub-module, which contains the JVMInlineExpressionParser interface that can be used by each sub-module.
  • Add the shardingsphere-infra-expr-core sub-module.
  • Add the shardingsphere-infra-expr-hotsopt and shardingsphere-infra-expr-espresso sub-modules.
  • Note:
    • Unfortunately, I believe it is not possible to convert Copy Jar's Maven Goal into Byte Buddy related APIs for use, as this seems to be different from the requirements of Espresso. Moreover, at present, the Maven Profile of generateStandardMetadata has to intentionally skip unit tests related to Byte Buddy. We need to wait for more processing at Offer API to interact with Assisted Configuration agent oracle/graal#3969 (comment) .
    • In order to find the actual location of the Jar, it seems that the Maven Goal of Copy Jar must be placed in the Espreso module instead of the Core module.
    • The EspressoInlineExpressionParser was made into an Impl of SPI, which resulted in it having to delay the initialization of the Truffle Context class instance. I separated two commits to show what happened. When attempting to initialize this class, the target device must have a GraalVM instance with the espresso component installed. Reference resources https://github.com/apache/shardingsphere/actions/runs/4908381324/jobs/8764116118?pr=25509 .

Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.

@linghengqian linghengqian marked this pull request as ready for review May 7, 2023 18:50
@terrymanu terrymanu added this to the 5.4.0 milestone May 8, 2023
@terrymanu terrymanu merged commit 46135bb into apache:master May 8, 2023
@linghengqian linghengqian deleted the redesign-groovy branch May 8, 2023 05:38
@terrymanu terrymanu mentioned this pull request May 8, 2023
kyooosukedn pushed a commit to kyooosukedn/shardingsphere that referenced this pull request May 16, 2023
* Re-design for ShardingSphere groovy expr

* Delay the initialization of the Truffle Context class instance in the EspressoInlineExpressionParser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-design for ShardingSphere groovy expr

2 participants