chore: ensure test results are consistent

pull/24376/head
Stuart Carnie 2023-04-18 17:08:42 +10:00
parent fc9b89da44
commit 6eeec9d448
No known key found for this signature in database
GPG Key ID: 848D9C9718D78B4F
2 changed files with 17 additions and 2 deletions

View File

@ -467,15 +467,23 @@ SELECT FIRST(usage_idle), usage_user, usage_system FROM cpu;
-- DISTINCT
--
-- There is no guaranteed order
SELECT COUNT(DISTINCT str) FROM m0;
-- IOX_COMPARE: sorted
SELECT COUNT(DISTINCT str) FROM m0 GROUP BY tag0;
-- IOX_COMPARE: sorted
SELECT DISTINCT str FROM m0;
-- IOX_COMPARE: sorted
SELECT DISTINCT(str) FROM m0;
-- IOX_COMPARE: sorted
SELECT DISTINCT str FROM m0 GROUP BY tag0;
-- IOX_COMPARE: sorted
SELECT DISTINCT str FROM m0 GROUP BY tag0 LIMIT 1;
-- test with integers
-- IOX_COMPARE: sorted
SELECT DISTINCT i64 FROM m0;
-- IOX_COMPARE: sorted
SELECT COUNT(DISTINCT i64) FROM m0;
-- mixed

View File

@ -2386,6 +2386,7 @@ name: m0
| 1970-01-01T00:00:00 | 2 |
+---------------------+-------+
-- InfluxQL: SELECT COUNT(DISTINCT str) FROM m0 GROUP BY tag0;
-- Results After Sorting
name: m0
tags: tag0=val00
+---------------------+-------+
@ -2408,6 +2409,7 @@ tags: tag0=val02
| 1970-01-01T00:00:00 | 1 |
+---------------------+-------+
-- InfluxQL: SELECT DISTINCT str FROM m0;
-- Results After Sorting
name: m0
+---------------------+----------+
| time | distinct |
@ -2416,6 +2418,7 @@ name: m0
| 1970-01-01T00:00:00 | lo |
+---------------------+----------+
-- InfluxQL: SELECT DISTINCT(str) FROM m0;
-- Results After Sorting
name: m0
+---------------------+----------+
| time | distinct |
@ -2424,6 +2427,7 @@ name: m0
| 1970-01-01T00:00:00 | lo |
+---------------------+----------+
-- InfluxQL: SELECT DISTINCT str FROM m0 GROUP BY tag0;
-- Results After Sorting
name: m0
tags: tag0=val00
+---------------------+----------+
@ -2447,6 +2451,7 @@ tags: tag0=val02
| 1970-01-01T00:00:00 | lo |
+---------------------+----------+
-- InfluxQL: SELECT DISTINCT str FROM m0 GROUP BY tag0 LIMIT 1;
-- Results After Sorting
name: m0
tags: tag0=val00
+---------------------+----------+
@ -2469,16 +2474,18 @@ tags: tag0=val02
| 1970-01-01T00:00:00 | lo |
+---------------------+----------+
-- InfluxQL: SELECT DISTINCT i64 FROM m0;
-- Results After Sorting
name: m0
+---------------------+----------+
| time | distinct |
+---------------------+----------+
| 1970-01-01T00:00:00 | 392 |
| 1970-01-01T00:00:00 | 211 |
| 1970-01-01T00:00:00 | 101 |
| 1970-01-01T00:00:00 | 191 |
| 1970-01-01T00:00:00 | 211 |
| 1970-01-01T00:00:00 | 392 |
+---------------------+----------+
-- InfluxQL: SELECT COUNT(DISTINCT i64) FROM m0;
-- Results After Sorting
name: m0
+---------------------+-------+
| time | count |