sqllogictest

Check-in [fb12af96c2]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix aggregate function evidence tests to work with the scan-by-index optimization.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fb12af96c24a3f9aaab2d8de9768c341e73aca04
User & Date: drh 2012-12-05 15:02:03.375
Context
2012-12-05
15:03
Pull in an SQLite amalgamation 3.7.15 beta. check-in: 13409d2824 user: drh tags: trunk
15:02
Fix aggregate function evidence tests to work with the scan-by-index optimization. check-in: fb12af96c2 user: drh tags: trunk
04:43
Improve the ability to compile and test on Windows using MinGW. check-in: b5fbadd16e user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/evidence/slt_lang_aggfunc.test.
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

query I nosort
SELECT max(DISTINCT x) FROM t1
----
1

query T nosort
SELECT group_concat(DISTINCT x) FROM t1
----
1,0


# EVIDENCE-OF: R-00171-59428 In such cases, duplicate elements are
# filtered before being passed into the aggregate function.








|







52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

query I nosort
SELECT max(DISTINCT x) FROM t1
----
1

query T nosort
SELECT group_concat(DISTINCT x) FROM t1 NOT INDEXED
----
1,0


# EVIDENCE-OF: R-00171-59428 In such cases, duplicate elements are
# filtered before being passed into the aggregate function.

232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
SELECT count(DISTINCT *) FROM t1 WHERE y='false'


# EVIDENCE-OF: R-56088-25150 The group_concat() function returns a
# string which is the concatenation of all non-NULL values of X.

query T nosort
SELECT group_concat(x) FROM t1
----
1,0,2,2

query T nosort
SELECT group_concat(DISTINCT x) FROM t1
----
1,0,2


# EVIDENCE-OF: R-08600-21007 If parameter Y is present then it is used
# as the separator between instances of X.

query T nosort
SELECT group_concat(x,':') FROM t1
----
1:0:2:2

# TBD: DISTINCT can only be used with single parameters
statement error
SELECT group_concat(DISTINCT x,':') FROM t1


# EVIDENCE-OF: R-39910-14723 A comma (",") is used as the separator if Y
# is omitted.

query T nosort
SELECT group_concat(x) FROM t1
----
1,0,2,2

query T nosort
SELECT group_concat(DISTINCT x) FROM t1
----
1,0,2


# EVIDENCE-OF: R-52585-35928 The max() aggregate function returns the
# maximum value of all values in the group.








|




|








|












|




|







232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
SELECT count(DISTINCT *) FROM t1 WHERE y='false'


# EVIDENCE-OF: R-56088-25150 The group_concat() function returns a
# string which is the concatenation of all non-NULL values of X.

query T nosort
SELECT group_concat(x) FROM t1 NOT INDEXED
----
1,0,2,2

query T nosort
SELECT group_concat(DISTINCT x) FROM t1 NOT INDEXED
----
1,0,2


# EVIDENCE-OF: R-08600-21007 If parameter Y is present then it is used
# as the separator between instances of X.

query T nosort
SELECT group_concat(x,':') FROM t1 NOT INDEXED
----
1:0:2:2

# TBD: DISTINCT can only be used with single parameters
statement error
SELECT group_concat(DISTINCT x,':') FROM t1


# EVIDENCE-OF: R-39910-14723 A comma (",") is used as the separator if Y
# is omitted.

query T nosort
SELECT group_concat(x) FROM t1 NOT INDEXED
----
1,0,2,2

query T nosort
SELECT group_concat(DISTINCT x) FROM t1 NOT INDEXED
----
1,0,2


# EVIDENCE-OF: R-52585-35928 The max() aggregate function returns the
# maximum value of all values in the group.

489
490
491
492
493
494
495
496
497
query R nosort
SELECT total(x) FROM t1
----

query R nosort
SELECT total(DISTINCT x) FROM t1
----









<
<
489
490
491
492
493
494
495


query R nosort
SELECT total(x) FROM t1
----

query R nosort
SELECT total(DISTINCT x) FROM t1
----