-
Notifications
You must be signed in to change notification settings - Fork 114
Support UDF in plan generator #3040
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
Merged
Merged
Changes from 43 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
d0e0f94
working
pengpeng-lu 7c0bdae
refactor RLInvokedRoutine step 1
pengpeng-lu 1e3f7b4
refactor RLInvokedRoutine done
pengpeng-lu 2ecb9c3
refactor parser
pengpeng-lu 9fd1f1d
merge main
pengpeng-lu 9cfdf52
style
pengpeng-lu 6cf351a
Merge branch 'main' into udo
pengpeng-lu 4b895f7
fix test
pengpeng-lu c86f824
style
pengpeng-lu 08aa8e6
Merge branch 'main' into udo
pengpeng-lu d18d804
parser change
pengpeng-lu 750e9be
InvokedRoutine
pengpeng-lu 5a82038
lookupnestedField
pengpeng-lu 7514f03
add temp scalar function tests in AstNormalizerTest
pengpeng-lu cb237f7
style and teamscale
pengpeng-lu 9d587d8
spotbug
pengpeng-lu e143ec5
Merge branch 'main' into udo
pengpeng-lu 8ad14ee
nit
pengpeng-lu 3d0b01d
save
pengpeng-lu df1b1c6
Merge branch 'main' into udo
pengpeng-lu 31b64e3
merge main
pengpeng-lu 588da38
visitSqlParameterDeclarationList
pengpeng-lu 05227ea
add more tests
pengpeng-lu 6961f1b
Merge branch 'main' into udo
pengpeng-lu fd7b884
normalize function name
pengpeng-lu e967c76
Merge branch 'main' into udo
pengpeng-lu d4a43ae
checkstyle
pengpeng-lu 31d3c8e
more tests
pengpeng-lu f1b6260
merge main
pengpeng-lu 1f497ae
teamscale gaps
pengpeng-lu 930579b
Merge branch 'main' into udo
pengpeng-lu eda5a37
style
pengpeng-lu 2b0b77c
merge main
pengpeng-lu 1740682
Merge branch 'main' into udo
pengpeng-lu 04960e2
add signature to TypedVisitor
pengpeng-lu abbae80
rename
pengpeng-lu 707eaa6
Merge branch 'main' into udo
pengpeng-lu 384c97d
serializationn modify
pengpeng-lu b90f975
style
pengpeng-lu 45f139f
Merge branch 'main' into udo
pengpeng-lu 706f2b5
add unit test Teamscale need
pengpeng-lu 59eeca0
merge main
pengpeng-lu 404d4f4
fix test
pengpeng-lu cc3c49a
typo
pengpeng-lu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,5 +1,5 @@ | ||||||
| /* | ||||||
| * MacroFunction.java | ||||||
| * UserDefinedMacroFunction.java | ||||||
| * | ||||||
| * This source file is part of the FoundationDB open source project | ||||||
| * | ||||||
|
|
@@ -20,33 +20,33 @@ | |||||
|
|
||||||
| package com.apple.foundationdb.record.query.plan.cascades; | ||||||
|
|
||||||
| import com.apple.foundationdb.record.PlanDeserializer; | ||||||
| import com.apple.foundationdb.record.PlanHashable; | ||||||
| import com.apple.foundationdb.record.PlanSerializationContext; | ||||||
| import com.apple.foundationdb.record.RecordCoreException; | ||||||
| import com.apple.foundationdb.record.RecordMetaDataProto; | ||||||
| import com.apple.foundationdb.record.planprotos.PMacroFunctionValue; | ||||||
| import com.apple.foundationdb.record.planprotos.PUserDefinedMacroFunction; | ||||||
| import com.apple.foundationdb.record.query.plan.cascades.typing.Typed; | ||||||
| import com.apple.foundationdb.record.query.plan.cascades.values.QuantifiedObjectValue; | ||||||
| import com.apple.foundationdb.record.query.plan.cascades.values.Value; | ||||||
| import com.apple.foundationdb.record.query.plan.cascades.values.translation.RegularTranslationMap; | ||||||
| import com.apple.foundationdb.record.query.plan.cascades.values.translation.TranslationMap; | ||||||
| import com.google.auto.service.AutoService; | ||||||
| import com.apple.foundationdb.record.query.plan.serialization.DefaultPlanSerializationRegistry; | ||||||
|
|
||||||
| import javax.annotation.Nonnull; | ||||||
| import java.util.List; | ||||||
| import java.util.Map; | ||||||
| import java.util.stream.Collectors; | ||||||
|
|
||||||
| /** | ||||||
| * MacroFunction that expands a body (referring to parameters) into a {@link Value} (through encapsulation) call site. | ||||||
| * UserDefinedScalarFunction that expands a body (referring to parameters) into a {@link Value} (through encapsulation) call site. | ||||||
|
||||||
| * UserDefinedScalarFunction that expands a body (referring to parameters) into a {@link Value} (through encapsulation) call site. | |
| * UserDefinedMacroFunction that expands a body (referring to parameters) into a {@link Value} (through encapsulation) call site. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 0 additions & 78 deletions
78
...re/src/test/java/com/apple/foundationdb/record/query/plan/cascades/MacroFunctionTest.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are user-defined scalar functions that are not covered by this kind of function, i.e:
These are regular SQL-bodied functions that do provably (or only at-runtime provably) return exactly one value.
I liked the name
MacroFunctionas it encapsulated the drop in/replace logic of these mini-functions. Can we rename it back? Or something else that clearly describes what this thing does?