-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Mark aggregate functions callable #10805
Merged
GuptaManan100
merged 1 commit into
vitessio:main
from
planetscale:dbussink/aggregate-functions-callable
Jul 25, 2022
Merged
Mark aggregate functions callable #10805
GuptaManan100
merged 1 commit into
vitessio:main
from
planetscale:dbussink/aggregate-functions-callable
Jul 25, 2022
Conversation
This file contains 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
These should also implement the iCallable interface as they are also callable as functions. Signed-off-by: Dirkjan Bussink <[email protected]>
dbussink
requested review from
harshit-gangal,
systay,
frouioui and
GuptaManan100
as code owners
July 25, 2022 11:06
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
GuptaManan100
approved these changes
Jul 25, 2022
systay
added a commit
to planetscale/vitess
that referenced
this pull request
Aug 19, 2022
* Refactor aggregation AST structs (vitessio#10347) * SQLParser:Refactoring Add count struct Signed-off-by: Rameez Sajwani <[email protected]> * SQLParser:Refactoring Add countStar struct Signed-off-by: Rameez Sajwani <[email protected]> * SQLParser:Refactoring Add avg struct Signed-off-by: Rameez Sajwani <[email protected]> * SQLParser:Refactoring Add max struct Signed-off-by: Rameez Sajwani <[email protected]> * SQLParser:Refactoring Add min struct Signed-off-by: Rameez Sajwani <[email protected]> * SQLParser:Refactoring Add sum struct Signed-off-by: Rameez Sajwani <[email protected]> * SQLParser:Refactoring Fixing Parser Aggr Function Signed-off-by: Rameez Sajwani <[email protected]> * fix: the return type of count was wrong Signed-off-by: Andres Taylor <[email protected]> * Refacotring code Signed-off-by: Rameez Sajwani <[email protected]> * More refactoring and unit test cases fix Signed-off-by: Rameez Sajwani <[email protected]> * removing getarg from aggregate interface Signed-off-by: Rameez Sajwani <[email protected]> * Fixing bugs after merge Signed-off-by: Rameez Sajwani <[email protected]> * Optimizing code Signed-off-by: Rameez Sajwani <[email protected]> * Fixing planBuilder test cases` Signed-off-by: Rameez Sajwani <[email protected]> * Adding more aggregate functions Signed-off-by: Rameez Sajwani <[email protected]> * Fixing parser errors Signed-off-by: Rameez Sajwani <[email protected]> * fixing feedback , code review Signed-off-by: Rameez Sajwani <[email protected]> * Fix regression which making changes in previous commit Signed-off-by: Rameez Sajwani <[email protected]> * Fixing vdiff tests Signed-off-by: Rameez Sajwani <[email protected]> * Fixing replication test Signed-off-by: Rameez Sajwani <[email protected]> * Fixing vstreamer planbuilder test Signed-off-by: Rameez Sajwani <[email protected]> * remove redundant code Signed-off-by: Rameez Sajwani <[email protected]> Co-authored-by: Andres Taylor <[email protected]> Signed-off-by: Vicent Marti <[email protected]> * Add parsing support for performance schema functions (vitessio#10478) * feat: add parsing support for performance schema functions Signed-off-by: Kushal Kumar <[email protected]> * fix: update sql.go by making parser Signed-off-by: Kushal Kumar <[email protected]> Signed-off-by: Vicent Marti <[email protected]> * Reduce shift-reduce conflicts (vitessio#10500) * feat: reduce shift-reduce conflicts by using the precedence symbol FUNCTION_CALL_NON_KEYWORD Signed-off-by: Manan Gupta <[email protected]> * feat: fix static check workflow to setup go in cases of parser changes too Signed-off-by: Manan Gupta <[email protected]> Signed-off-by: Vicent Marti <[email protected]> * Cleanup: Remove 'Name' field from aggregate structure (vitessio#10507) * Code clean up Signed-off-by: Rameez Sajwani <[email protected]> * Fixing unit test case failures Signed-off-by: Rameez Sajwani <[email protected]> * Fixing replicator planner unit tests Signed-off-by: Rameez Sajwani <[email protected]> * Adding unit test cases of canonical output Signed-off-by: Rameez Sajwani <[email protected]> * Fix unit test Signed-off-by: Rameez Sajwani <[email protected]> Signed-off-by: Vicent Marti <[email protected]> * User defined and sys variables (vitessio#10547) * feat: add user defined variables and sys variables as separate structs and use user-defined variable in Execute statement Signed-off-by: Manan Gupta <[email protected]> * feat: remove parsing of at_id and at_at_id from places that shouldn't parse it Signed-off-by: Manan Gupta <[email protected]> Signed-off-by: Andres Taylor <[email protected]> * feat: use ci_identifier in more places Signed-off-by: Andres Taylor <[email protected]> * refactor: clean up the JSON AST structs a little Signed-off-by: Andres Taylor <[email protected]> * refactor: use remove unnesseccary scope Signed-off-by: Andres Taylor <[email protected]> * Created new Variable node to divide the work of ColName Signed-off-by: Florent Poinsard <[email protected]> * refactor fix sqlparser: SET ast and parsing Signed-off-by: Andres Taylor <[email protected]> * refactor: remove unused ast-structs Signed-off-by: Andres Taylor <[email protected]> * refactor: clean up how variables are parsed and formatted Signed-off-by: Andres Taylor <[email protected]> * fix: make the new AST work in the planbuilder Signed-off-by: Andres Taylor <[email protected]> * refactor: rename ColIdent and TableIdent Signed-off-by: Andres Taylor <[email protected]> * fix: set name should be parsed with SessionScope Signed-off-by: Andres Taylor <[email protected]> * chore: clean and document stuff Signed-off-by: Andres Taylor <[email protected]> * test: update test expectation Signed-off-by: Andres Taylor <[email protected]> * fix: default scope for transaction isolation should not be session Signed-off-by: Andres Taylor <[email protected]> * feat: handle local as a synonym for session for variable scopes Signed-off-by: Andres Taylor <[email protected]> * comments: clean up code comments Signed-off-by: Andres Taylor <[email protected]> Co-authored-by: Manan Gupta <[email protected]> Co-authored-by: Florent Poinsard <[email protected]> Signed-off-by: Vicent Marti <[email protected]> * Revert "[Backport 14.0] enable schema tracking by default (vitessio#10595)" This reverts commit 8ebe1cc. Signed-off-by: Vicent Marti <[email protected]> * enable schema tracking by default (vitessio#10455) * feat: enable schema tracking by default Signed-off-by: Harshit Gangal <[email protected]> * test: fix test setup Signed-off-by: Harshit Gangal <[email protected]> * test: fix vschema test setup Signed-off-by: Harshit Gangal <[email protected]> * test: turn off schema tracking on the tablet Signed-off-by: Andres Taylor <[email protected]> * test: fix test assertion Signed-off-by: Andres Taylor <[email protected]> * Change read query for checks that test to which keyspace a table is routed to. This uses the /queryz vttablet endpoint where the query gets expanded if schema tracking is enabled, hence failing an exact query check Signed-off-by: Rohit Nayak <[email protected]> * test: only use gen4 planner Signed-off-by: Harshit Gangal <[email protected]> * fix: column list population in insert with auto-inc column Signed-off-by: Harshit Gangal <[email protected]> * fix: change parser to keep empty column list as provided by user Signed-off-by: Harshit Gangal <[email protected]> * test: fix test expectation Signed-off-by: Harshit Gangal <[email protected]> Co-authored-by: Andres Taylor <[email protected]> Co-authored-by: Rohit Nayak <[email protected]> Signed-off-by: Vicent Marti <[email protected]> * Add parsing support for GTID functions (vitessio#10579) * feat: add parsing support for GTID functions Signed-off-by: Kushal Kumar <[email protected]> * test: add planner and end to end tests for a few gtid functions Signed-off-by: Manan Gupta <[email protected]> Co-authored-by: Manan Gupta <[email protected]> Signed-off-by: Vicent Marti <[email protected]> * Parameterize BIT types and fixes in HEX types (vitessio#10689) * feat: add parsing for bitnums Signed-off-by: Manan Gupta <[email protected]> * test: add invalid cases to tests Signed-off-by: Manan Gupta <[email protected]> * feat: normalize bitnums to bit vals too Signed-off-by: Manan Gupta <[email protected]> * feat: add normalization for bit literals Signed-off-by: Manan Gupta <[email protected]> * feat: parameterize binary value to hex Signed-off-by: Harshit Gangal <[email protected]> * test: added e2e test in vtgate and vttablet Signed-off-by: Harshit Gangal <[email protected]> * fix: fix the type conversion from hexnum and hexval to binary Signed-off-by: Harshit Gangal <[email protected]> * test: refactor test Signed-off-by: Harshit Gangal <[email protected]> * fix: return varbinary and flaghex for hexval and hexnum in eval engine typeOf Signed-off-by: Harshit Gangal <[email protected]> * test: separate expectation for mysql and vitess result Signed-off-by: Harshit Gangal <[email protected]> * test: fix test expectation Signed-off-by: Harshit Gangal <[email protected]> * feat: added bitnum bind variable and test Signed-off-by: Harshit Gangal <[email protected]> * proto: vtadmin side update Signed-off-by: Harshit Gangal <[email protected]> * test: fixed test and added more bitnum bind var test Signed-off-by: Harshit Gangal <[email protected]> * added license header Signed-off-by: Harshit Gangal <[email protected]> Co-authored-by: Manan Gupta <[email protected]> Signed-off-by: Vicent Marti <[email protected]> * Mark aggregate functions callable (vitessio#10805) These should also implement the iCallable interface as they are also callable as functions. Signed-off-by: Dirkjan Bussink <[email protected]> Signed-off-by: Vicent Marti <[email protected]> * cherry-pick: fix bad merge Signed-off-by: Vicent Marti <[email protected]> Co-authored-by: rsajwani <[email protected]> Co-authored-by: Andres Taylor <[email protected]> Co-authored-by: Kushal Kumar <[email protected]> Co-authored-by: Manan Gupta <[email protected]> Co-authored-by: Manan Gupta <[email protected]> Co-authored-by: Florent Poinsard <[email protected]> Co-authored-by: Harshit Gangal <[email protected]> Co-authored-by: Rohit Nayak <[email protected]> Co-authored-by: Dirkjan Bussink <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
These should also implement the iCallable interface as they are also callable as functions.
Related Issue(s)
This was missed in #10347
Checklist