forked from apache/horaedb
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add test case upgraded arrow&datafusion (apache#272)
* test: add test case for issue apache#253 * chore: ignore `.out` file in gitignore * chore: fix typo Co-authored-by: WEI Xikai <[email protected]>
- Loading branch information
1 parent
b3c8cd1
commit 5545587
Showing
3 changed files
with
49 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ target | |
.DS_Store | ||
.idea/ | ||
.vscode | ||
*.out |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,75 @@ | ||
DROP TABLE IF EXISTS `02_function_aggretate_table1`; | ||
DROP TABLE IF EXISTS `02_function_aggregate_table1`; | ||
|
||
affected_rows: 0 | ||
|
||
CREATE TABLE `02_function_aggretate_table1` ( `timestamp` timestamp NOT NULL, `arch` string TAG, `datacenter` string TAG, `value` int, timestamp KEY (timestamp)) ENGINE=AnalyticWITH( enable_ttl='false'); | ||
CREATE TABLE `02_function_aggregate_table1` ( `timestamp` timestamp NOT NULL, `arch` string TAG, `datacenter` string TAG, `value` int, `uvalue` uint64, timestamp KEY (timestamp)) ENGINE=AnalyticWITH( enable_ttl='false'); | ||
|
||
affected_rows: 0 | ||
|
||
INSERT INTO `02_function_aggretate_table1` (`timestamp`, `arch`, `datacenter`, `value`)VALUES (1658304762, 'x86-64', 'china', 100), (1658304763, 'x86-64', 'china', 200), (1658304762, 'arm64', 'china', 110), (1658304763, 'arm64', 'china', 210); | ||
INSERT INTO `02_function_aggregate_table1` (`timestamp`, `arch`, `datacenter`, `value`, `uvalue`)VALUES (1658304762, 'x86-64', 'china', 100, 10), (1658304763, 'x86-64', 'china', 200, 10), (1658304762, 'arm64', 'china', 110, 0), (1658304763, 'arm64', 'china', 210, 0); | ||
|
||
affected_rows: 4 | ||
|
||
SELECT sum(`value`) FROM `02_function_aggretate_table1`; | ||
SELECT sum(`value`) FROM `02_function_aggregate_table1`; | ||
|
||
SUM(02_function_aggretate_table1.value), | ||
SUM(02_function_aggregate_table1.value), | ||
Int64(620), | ||
|
||
|
||
SELECT `arch`, sum(`value`)FROM `02_function_aggretate_table1`WHERE `timestamp` BETWEEN 1658304763 AND 1658304763GROUP BY `arch`ORDER BY `arch` DESC; | ||
SELECT `arch`, sum(`value`)FROM `02_function_aggregate_table1`WHERE `timestamp` BETWEEN 1658304763 AND 1658304763GROUP BY `arch`ORDER BY `arch` DESC; | ||
|
||
arch,SUM(02_function_aggretate_table1.value), | ||
arch,SUM(02_function_aggregate_table1.value), | ||
String(StringBytes(b"x86-64")),Int64(200), | ||
String(StringBytes(b"arm64")),Int64(210), | ||
|
||
|
||
SELECT count(`value`) FROM `02_function_aggretate_table1`; | ||
SELECT count(`value`) FROM `02_function_aggregate_table1`; | ||
|
||
COUNT(02_function_aggretate_table1.value), | ||
COUNT(02_function_aggregate_table1.value), | ||
Int64(4), | ||
|
||
|
||
SELECT avg(`value`) FROM `02_function_aggretate_table1`; | ||
SELECT avg(`value`) FROM `02_function_aggregate_table1`; | ||
|
||
AVG(02_function_aggretate_table1.value), | ||
AVG(02_function_aggregate_table1.value), | ||
Double(155.0), | ||
|
||
|
||
SELECT max(`value`) FROM `02_function_aggretate_table1`; | ||
SELECT max(`value`) FROM `02_function_aggregate_table1`; | ||
|
||
MAX(02_function_aggretate_table1.value), | ||
MAX(02_function_aggregate_table1.value), | ||
Int32(210), | ||
|
||
|
||
SELECT min(`value`) FROM `02_function_aggretate_table1`; | ||
SELECT min(`value`) FROM `02_function_aggregate_table1`; | ||
|
||
MIN(02_function_aggretate_table1.value), | ||
MIN(02_function_aggregate_table1.value), | ||
Int32(100), | ||
|
||
|
||
INSERT INTO `02_function_aggretate_table1` (`timestamp`, `arch`, `datacenter`, `value`)VALUES (1658304762, 'x86-64', 'china', 100); | ||
SELECT min(`uvalue`) - max(`uvalue`) FROM `02_function_aggregate_table1`; | ||
|
||
MIN(02_function_aggregate_table1.uvalue) - MAX(02_function_aggregate_table1.uvalue), | ||
Int64(-10), | ||
|
||
|
||
INSERT INTO `02_function_aggregate_table1` (`timestamp`, `arch`, `datacenter`, `value`)VALUES (1658304762, 'x86-64', 'china', 100); | ||
|
||
affected_rows: 1 | ||
|
||
SELECT count(`arch`) FROM `02_function_aggretate_table1`; | ||
SELECT count(`arch`) FROM `02_function_aggregate_table1`; | ||
|
||
COUNT(02_function_aggretate_table1.arch), | ||
COUNT(02_function_aggregate_table1.arch), | ||
Int64(4), | ||
|
||
|
||
SELECT count(distinct(`arch`)) FROM `02_function_aggretate_table1`; | ||
SELECT count(distinct(`arch`)) FROM `02_function_aggregate_table1`; | ||
|
||
COUNT(DISTINCT 02_function_aggretate_table1.arch), | ||
COUNT(DISTINCT 02_function_aggregate_table1.arch), | ||
Int64(2), | ||
|
||
|
||
DROP TABLE `02_function_aggretate_table1`; | ||
DROP TABLE `02_function_aggregate_table1`; | ||
|
||
affected_rows: 0 | ||
|
This file contains 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