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

Migrate AstRewriterBase to PIG's VisitorTransform #356

Merged
merged 15 commits into from
Jan 21, 2021
Merged

Conversation

alancai98
Copy link
Member

Migrates AstRewriterBase to PIG's VisitorTransform.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-io
Copy link

codecov-io commented Jan 11, 2021

Codecov Report

Merging #356 (b6a1ad3) into master (a8f59bf) will decrease coverage by 0.68%.
The diff coverage is 84.58%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #356      +/-   ##
============================================
- Coverage     82.37%   81.68%   -0.69%     
+ Complexity     1233     1211      -22     
============================================
  Files           157      158       +1     
  Lines          9366     9452      +86     
  Branches       1526     1537      +11     
============================================
+ Hits           7715     7721       +6     
- Misses         1192     1264      +72     
- Partials        459      467       +8     
Flag Coverage Δ Complexity Δ
CLI 18.11% <ø> (ø) 0.00 <ø> (ø)
EXAMPLES 76.09% <88.46%> (+0.08%) 0.00 <2.00> (ø)
LANG 84.20% <84.37%> (-0.83%) 0.00 <64.00> (ø)
PTS 100.00% <ø> (ø) 0.00 <ø> (ø)
TEST_SCRIPT 79.68% <ø> (ø) 0.00 <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
cli/src/org/partiql/cli/Repl.kt 0.00% <ø> (ø) 0.00 <0.00> (ø)
...s/src/kotlin/org/partiql/examples/ParserExample.kt 100.00% <ø> (ø) 2.00 <0.00> (ø)
...mples/src/kotlin/org/partiql/examples/util/Main.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
lang/src/org/partiql/lang/ast/InternalMetas.kt 71.42% <ø> (ø) 0.00 <0.00> (ø)
...src/org/partiql/lang/ast/passes/AstRewriterBase.kt 100.00% <ø> (ø) 109.00 <0.00> (ø)
...g/partiql/lang/ast/passes/MetaStrippingRewriter.kt 100.00% <ø> (ø) 4.00 <0.00> (ø)
...ang/src/org/partiql/lang/eval/GroupKeyExprValue.kt 71.42% <ø> (ø) 2.00 <0.00> (ø)
lang/src/org/partiql/lang/eval/CompileOptions.kt 81.81% <60.00%> (ø) 5.00 <1.00> (ø)
lang/src/org/partiql/lang/domains/util.kt 66.66% <65.00%> (-33.34%) 0.00 <0.00> (ø)
...l/lang/eval/visitors/SelectStarVisitorTransform.kt 74.60% <74.60%> (ø) 11.00 <11.00> (?)
... and 42 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8f59bf...b6a1ad3. Read the comment docs.

Copy link
Member

@dlurton dlurton left a comment

Choose a reason for hiding this comment

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

Overall LGTM (as it should since each commit was a previously reviewed PR!) but I think we need to add a CompilerPipeline.addPreprocessingStep overload for PartiqlAst.

dlurton
dlurton previously approved these changes Jan 13, 2021
Copy link
Member

@dlurton dlurton left a comment

Choose a reason for hiding this comment

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

Actually, if you want you can do that addProcessingStep overload in a PR and merge this one. Approving now so you have that option.

… RewriterTestBase and add depr. Remove depr warning from ExprNodeExtensions
@alancai98
Copy link
Member Author

New commit

  • moves MetaStrippingRewriter back to the src directory and adds a deprecation warning
  • adds back RewriterTestBase and adds a deprecation warning
  • deletes deprecation warnings from ExprNodeExtensions

I felt the MetaStrippingRewriter and RewriterTestBase additions/changes are needed (at least for now) to not break existing client code that may rely on those public APIs. Deprecation warnings were added to prevent further usage.

I deleted the deprecation warnings in ExprNodeExtensions because the functions are still in use by the EvaluatingCompiler. In the future when we deprecate ExprNode, we should deprecate the ExprNodeExtensions functions.

As for the addProcessingStep overload, I will make a separate PR to track that change since it may involve adding some additional deprecation warnings.

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