opt: fix ResolvedType() for aggregateInfo in the optbuilder#50815
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Jun 30, 2020
Merged
opt: fix ResolvedType() for aggregateInfo in the optbuilder#50815craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Member
RaduBerinde
approved these changes
Jun 30, 2020
Member
RaduBerinde
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @RaduBerinde)
Prior to this commit, it was possible that calling ResolvedType() on an aggregateInfo object returned the wrong type. This was because aggregateInfo did not implement ResolvedType(), and was therefore passing the call to the embedded tree.FuncExpr, which may have been stripped of its original type information. This commit fixes the problem by adding an implementation of ResolvedType() to aggregateInfo, which simply returns the type of the aggregation column represented by the struct. Fixes cockroachdb#46914 Release note (bug fix): Fixed an internal error that could happen during planning for some queries with aggregate functions embedded in complex scalar expressions.
Collaborator
Author
|
TFTR! bors r+ |
craig bot
pushed a commit
that referenced
this pull request
Jun 30, 2020
50709: sql,execinfrapb: DistSQLPlanner and related changes for inverted join r=sumeerbhola a=sumeerbhola Release note: None 50760: backupccl: fix formatting of backup jobs in jobs table r=pbardea a=pbardea When adding cluster backup/restore, the method which generated the job description was not updated to handle cluster backups. Previously, a cluster backup job would appear in the jobs table as `BACKUP TABLE TO` rather than `BACKUP TO`. Release note (bug fix): Cluster backup would previously appear as `BACKUP TABLE TO` rather than `BACKUP TO` in the jobs table. 50770: roachtest: update version map and create fixtures r=jlinder a=asubiotto This commit adds the recently released 19.1.10, 19.2.8, and 20.1.3 to the version map in PredecessorVersion. Release note: None (testing change) 50815: opt: fix ResolvedType() for aggregateInfo in the optbuilder r=rytaft a=rytaft Prior to this commit, it was possible that calling `ResolvedType()` on an `aggregateInfo` object returned the wrong type. This was because `aggregateInfo` did not implement `ResolvedType()`, and was therefore passing the call to the embedded `tree.FuncExpr`, which may have been stripped of its original type information. This commit fixes the problem by adding an implementation of `ResolvedType()` to `aggregateInfo`, which simply returns the type of the aggregation column represented by the struct. Fixes #46914 Release note (bug fix): Fixed an internal error that could happen during planning for some queries with aggregate functions embedded in complex scalar expressions. Co-authored-by: sumeerbhola <sumeer@cockroachlabs.com> Co-authored-by: Paul Bardea <pbardea@gmail.com> Co-authored-by: Alfonso Subiotto Marques <alfonso@cockroachlabs.com> Co-authored-by: Rebecca Taft <becca@cockroachlabs.com>
Contributor
Build failed (retrying...) |
Contributor
Build succeeded |
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
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.
Prior to this commit, it was possible that calling
ResolvedType()on an
aggregateInfoobject returned the wrong type. This was becauseaggregateInfodid not implementResolvedType(), and was thereforepassing the call to the embedded
tree.FuncExpr, which may have beenstripped of its original type information. This commit fixes the
problem by adding an implementation of
ResolvedType()toaggregateInfo,which simply returns the type of the aggregation column represented by
the struct.
Fixes #46914
Release note (bug fix): Fixed an internal error that could happen
during planning for some queries with aggregate functions embedded in
complex scalar expressions.