featurebase/sql3/test/defs
seebs b35c240da7
handle count(*) in having correctly (#2274)
* correct reference for `having count(*)`

It turns out that `having count(*) ...` was always treating
the count(*) as exactly 1. After studying this a lot, I noticed
that in fact, we correctly handle other counts. The reason is
that there's already code to recognize aggregates in `having`
clauses as matching aggregates that are being computed -- but
it only covers the other aggregate clause types, not the newly
added `countStarPlanExpression` from making `count(*)` work even
if there's no `_id` field.

We add several corresponding test cases.

* fix sum(a_decimal) type conversion

Added a test case for this, and also added a fix for it.
Underlying issue: qualifiedRefPlanExpression could end up
producing an int64 instead of a pql.Decimal, even though it
had expected type Decimal.

Originally this worked by politely converting an int64 to
a pql.Decimal in the Evaluate phase, but this was not ideal;
the real question is why it was coming out as an int64 at
that step. Showed this to Pat, who spent a while studying it
and produced a better fix.

* temporarily comment out test which fails in DAX
2023-03-01 23:49:45 -06:00
..
defs.go forward-port tests from SQL1 tree (#2261) 2023-03-01 13:40:50 -06:00
defs_aggregate.go Aggregation Nation (fb-1955, fb-1887) (#2252) 2023-02-16 10:56:27 -06:00
defs_between.go A bug fix roundup (#2242) 2023-02-13 12:28:34 -06:00
defs_binops.go add test coverage, fix bugs caught by added test coverage 2023-02-15 14:34:51 -06:00
defs_bool.go Introduce ServiceManager and Refactor DAX Integration tests (#2320) 2022-12-12 09:01:20 -08:00
defs_bulkinsert.go timestamp fixes (#2224) 2023-01-25 14:07:15 -06:00
defs_cast.go you should be able to cast an id as a string (#2334) 2022-12-12 09:01:20 -08:00
defs_create_table.go SHOW CREATE TABLE issues (fb-1810) (#2365) 2023-01-10 23:22:58 +00:00
defs_date_functions.go FB-1968 timestamp data type related fixes and enhancements (#2256) 2023-02-24 14:57:17 -05:00
defs_delete.go Implement DELETE (fb 1557) (#2382) 2023-01-10 23:25:08 +00:00
defs_distinct.go fix import paths 2023-01-11 18:59:24 +00:00
defs_filterpredicates.go forward-port tests from SQL1 tree (#2261) 2023-03-01 13:40:50 -06:00
defs_groupby.go Sync from private repo to commit 12d608c80d 2022-12-12 09:01:20 -08:00
defs_having.go handle count(*) in having correctly (#2274) 2023-03-01 23:49:45 -06:00
defs_in.go Move SQL3 test definitions into sql3/test/defs package (#2289) 2022-11-15 11:33:35 -08:00
defs_inserts.go FB-1968 timestamp data type related fixes and enhancements (#2256) 2023-02-24 14:57:17 -05:00
defs_join.go forward-port tests from SQL1 tree (#2261) 2023-03-01 13:40:50 -06:00
defs_keyed.go Introduce ServiceManager and Refactor DAX Integration tests (#2320) 2022-12-12 09:01:20 -08:00
defs_keyed_insert.go Introduce ServiceManager and Refactor DAX Integration tests (#2320) 2022-12-12 09:01:20 -08:00
defs_like.go implemented extract ddl; tightened up type related stuff (#2329) 2022-12-12 09:01:20 -08:00
defs_minmaxnegative.go Move SQL3 test definitions into sql3/test/defs package (#2289) 2022-11-15 11:33:35 -08:00
defs_null.go Implement DELETE (fb 1557) (#2382) 2023-01-10 23:25:08 +00:00
defs_orderby.go ORDER BY ....what now!? (fb-1954) (#2257) 2023-02-17 13:35:36 -06:00
defs_select.go add test coverage, fix bugs caught by added test coverage 2023-02-15 14:34:51 -06:00
defs_set_functions.go implemented extract ddl; tightened up type related stuff (#2329) 2022-12-12 09:01:20 -08:00
defs_sql1.go forward-port tests from SQL1 tree (#2261) 2023-03-01 13:40:50 -06:00
defs_string_functions.go FB-1862: Implement Str() scalar string function (#2215) 2023-02-14 15:58:36 -05:00
defs_subquery.go fix sum aggregate (fb-1874) (#2404) 2023-01-12 00:49:58 +00:00
defs_timequantum.go add support for time quantum inserts with explicit timestamps (fb-1558) (#2262) 2023-02-17 12:06:46 -06:00
defs_timestamp_literals.go FB-1968 timestamp data type related fixes and enhancements (#2256) 2023-02-24 14:57:17 -05:00
defs_top.go (fb-1779) make optimizer smarter with top operators and aggregate queries (#2323) 2022-12-12 09:01:20 -08:00
defs_unkeyed.go Add Drop Database and Drop Table support (#2208) 2023-01-23 19:59:47 -06:00
defs_unops.go Sync from private repo to commit 12d608c80d 2022-12-12 09:01:20 -08:00
defs_views.go implement CREATE/ALTER/DROP VIEW (fb-1592) (#2408) 2023-01-19 21:51:16 +00:00
types.go forward-port tests from SQL1 tree (#2261) 2023-03-01 13:40:50 -06:00