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

sql: support enums in the max/min aggregate functions #48370

Closed
rohany opened this issue May 4, 2020 · 0 comments · Fixed by #49558
Closed

sql: support enums in the max/min aggregate functions #48370

rohany opened this issue May 4, 2020 · 0 comments · Fixed by #49558
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@rohany
Copy link
Contributor

rohany commented May 4, 2020

Postgres allows aggregations with max/min over enum types.

@rohany rohany added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label May 4, 2020
@rohany rohany self-assigned this May 4, 2020
rohany added a commit to rohany/cockroach that referenced this issue May 26, 2020
Fixes cockroachdb#45846.
Fixes cockroachdb#46685.

This PR allows for performing the max/min aggregations on collated
strings. Currently, our aggregates would not support container types
like `AnyCollatedString`. This PR extends the aggregates infrastructure
in DistSQL that caused the limitation to allow for container types,
which unblocks cockroachdb#48370.

Release note (sql change): Support the max/min aggregations on collated
strings.
rohany added a commit to rohany/cockroach that referenced this issue May 26, 2020
Fixes cockroachdb#48370.

Release note (sql change): Add the max/min aggregation on ENUM types.
rohany added a commit to rohany/cockroach that referenced this issue May 26, 2020
Fixes cockroachdb#45846.
Fixes cockroachdb#46685.

This PR allows for performing the max/min aggregations on collated
strings. Currently, our aggregates would not support container types
like `AnyCollatedString`. This PR extends the aggregates infrastructure
in DistSQL that caused the limitation to allow for container types,
which unblocks cockroachdb#48370.

Release note (sql change): Support the max/min aggregations on collated
strings.
@rohany rohany mentioned this issue May 27, 2020
35 tasks
craig bot pushed a commit that referenced this issue May 27, 2020
49307: sql: add support for virtual schema qualified types r=rohany a=rohany

Fixes #16395.

Release note (sql change): Allows for referencing static data types
under the `pg_catalog` qualification like `pg_catalog.int`.

49530: sql: support max/min aggregates on collated strings r=rohany a=rohany

Fixes #45846.
Fixes #46685.

This PR allows for performing the max/min aggregations on collated
strings. Currently, our aggregates would not support container types
like `AnyCollatedString`. This PR extends the aggregates infrastructure
in DistSQL that caused the limitation to allow for container types,
which unblocks #48370.

Release note (sql change): Support the max/min aggregations on collated
strings.

49567: cloud: bump version to 20.1.1 r=dt a=dt

Release note: none.

49574: roachtest: get bigger machines for alterpk-tpcc-250 r=yuzefovich a=yuzefovich

The test has been failing for a while now because we're operating very
close to memory limit. Usually, 3.3.2.6 expensive check query ends up
crashing the node, sometimes it hits SQL memory limit. I've been staring
at it for a while, but there is a discrepancy between the memory usage
reported in runtime stats in logs and the usage that shows up in heap
profiles (for example, I could see 8GB in the former and 3GB in the
latter), and I couldn't figure out where that gaps goes. I don't think
spending any more time on this issue is worthwhile, so this commit bumps
the machine type from cpu-16 to cpu-32 which doubles available RAM from
14.4 to 28.8.

Fixes: #48428.

Release note: None

Co-authored-by: Rohan Yadav <[email protected]>
Co-authored-by: David Taylor <[email protected]>
Co-authored-by: Yahor Yuzefovich <[email protected]>
craig bot pushed a commit that referenced this issue May 27, 2020
48720: rowexec: add batchedInvertedExprEvaluator for inverted index execution r=sumeerbhola a=sumeerbhola

This is for evaluating invertedexpr.SpanExpressions, both for join
queries and single table filtering, using an inverted index.

This PR depends on #48466 which is the first commit. More usage
context can be found in #48019 which contains an invertedJoiner
that uses an earlier version of this evaluator. I am looking for
a review of the structure before adding tests.

Release note: None

49247: geo/geo*fn: handle EMPTY cases in GEOMETRY/GEOGRAPHY r=sumeerbhola a=otan

There are many cases of EMPTY that we need to handle for each method we
support. This includes `POINT EMPTY`, `LINESTRING EMPTY` ...
`GEOMETRYCOLLECTION EMPTY` (i.e. one for each shape). Furthermore,
there's an even more confusing GEOMETRYCOLLECTION with EMPTY shapes,
e.g. `GEOMETRYCOLLECTION ( LINESTRING EMPTY ) `

Both GEOS and PostGIS have various bugs in handling these, which have
been commented in code and imitated where appropriate.

Also bump twpayne/go-geom to pickup the fixed Empty() checks.

Resolves #49182, 

Release note: None

49558: sql: add the max/min aggregations on ENUMs r=rohany a=rohany

Fixes #48370.

Release note (sql change): Add the max/min aggregation on ENUM types.

Co-authored-by: sumeerbhola <[email protected]>
Co-authored-by: Oliver Tan <[email protected]>
Co-authored-by: Rohan Yadav <[email protected]>
@craig craig bot closed this as completed in 8a4aeed May 27, 2020
jbowens pushed a commit to jbowens/cockroach that referenced this issue Jun 1, 2020
Fixes cockroachdb#45846.
Fixes cockroachdb#46685.

This PR allows for performing the max/min aggregations on collated
strings. Currently, our aggregates would not support container types
like `AnyCollatedString`. This PR extends the aggregates infrastructure
in DistSQL that caused the limitation to allow for container types,
which unblocks cockroachdb#48370.

Release note (sql change): Support the max/min aggregations on collated
strings.
jbowens pushed a commit to jbowens/cockroach that referenced this issue Jun 1, 2020
Fixes cockroachdb#48370.

Release note (sql change): Add the max/min aggregation on ENUM types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant