Merge pull request #29806 from taosdata/fix/TD-33738-3.0B
fix: reduce compa size from 1M to 36k with 2 table 2000 rows
This commit is contained in:
commit
6f0bdb882c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,10 +0,0 @@
|
||||||
#!server_ver: ver:3.1.0.0
|
|
||||||
#!taosdump_ver: 2.5.2_cf16c4d
|
|
||||||
#!os_id: LINUX
|
|
||||||
#!escape_char: true
|
|
||||||
#!loose_mode: false
|
|
||||||
#!charset: UTF-8
|
|
||||||
CREATE DATABASE IF NOT EXISTS test REPLICA 1 DURATION 14400m KEEP 5256000m,5256000m,5256000m PRECISION 'ms' MINROWS 100 MAXROWS 4096 COMP 2 ;
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS test.`meters`(`ts` timestamp,`current` float,`voltage` int,`phase` float) TAGS(`groupid` int,`location` binary(24));
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,10 @@
|
||||||
|
#!server_ver: ver:3.1.0.0
|
||||||
|
#!taosdump_ver: 2.5.2_cf16c4d
|
||||||
|
#!os_id: LINUX
|
||||||
|
#!escape_char: true
|
||||||
|
#!loose_mode: false
|
||||||
|
#!charset: UTF-8
|
||||||
|
CREATE DATABASE IF NOT EXISTS test REPLICA 1 DURATION 14400m KEEP 5256000m,5256000m,5256000m PRECISION 'ms' MINROWS 100 MAXROWS 4096 COMP 2 ;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS test.`meters`(`ts` timestamp,`bc` bool,`fc` float,`dc` double,`ti` tinyint,`si` smallint,`ic` int,`bi` bigint,`uti` tinyint unsigned,`usi` smallint unsigned,`ui` int unsigned,`ubi` bigint unsigned,`bin` binary(4),`nch` nchar(8)) TAGS(`tbc` bool,`tfc` float,`tdc` double,`tti` tinyint,`tsi` smallint,`tic` int,`tbi` bigint,`tuti` tinyint unsigned,`tusi` smallint unsigned,`tui` int unsigned,`tubi` bigint unsigned,`tbin` binary(4),`tnch` nchar(8));
|
||||||
|
|
Binary file not shown.
|
@ -59,21 +59,40 @@ class TDTestCase(TBase):
|
||||||
# sum pk db
|
# sum pk db
|
||||||
sql = f"select {aggfun} from {db}.{stb}"
|
sql = f"select {aggfun} from {db}.{stb}"
|
||||||
tdSql.query(sql)
|
tdSql.query(sql)
|
||||||
value = tdSql.getData(0,0)
|
tdSql.checkData(0, 0, expect, show=True)
|
||||||
|
|
||||||
if value == expect:
|
|
||||||
tdLog.info(f"{aggfun} not equal. real={value} expect={expect}")
|
|
||||||
else:
|
|
||||||
tdLog.info(f"{aggfun} equal. real={value} expect={expect}")
|
|
||||||
|
|
||||||
|
|
||||||
def verifyResult(self, db):
|
def verifyResult(self, db):
|
||||||
|
|
||||||
# compare sum(pk)
|
# compare sum(pk)
|
||||||
stb = "meters"
|
stb = "meters"
|
||||||
self.checkSame(db, stb, "count(ts)", 100000)
|
self.checkSame(db, stb, "count(ts)", 5000)
|
||||||
self.checkSame(db, stb, "sum(current)", 1005767.2491703)
|
self.checkSame(db, stb, "last(ts)", "2023-11-15 07:36:39")
|
||||||
self.checkSame(db, stb, "avg(voltage)", 208.58818)
|
self.checkSame(db, stb, "last(bc)", False)
|
||||||
|
self.checkSame(db, stb, "sum(fc)", 2468.910999777726829)
|
||||||
|
self.checkSame(db, stb, "sum(dc)", 24811.172123999996984)
|
||||||
|
self.checkSame(db, stb, "sum(ti)", -411)
|
||||||
|
self.checkSame(db, stb, "sum(si)", 117073)
|
||||||
|
self.checkSame(db, stb, "sum(ic)", -39181)
|
||||||
|
self.checkSame(db, stb, "sum(bi)", -2231976)
|
||||||
|
self.checkSame(db, stb, "sum(uti)", 248825)
|
||||||
|
self.checkSame(db, stb, "sum(usi)", 248333)
|
||||||
|
self.checkSame(db, stb, "sum(ui)", 2484501)
|
||||||
|
self.checkSame(db, stb, "sum(ubi)", 25051956)
|
||||||
|
self.checkSame(db, stb, "last(bin)", "kwax")
|
||||||
|
self.checkSame(db, stb, "last(nch)", "0cYzPVcV")
|
||||||
|
|
||||||
|
self.checkSame(db, stb, "sum(tfc)", 3420.000076293945312)
|
||||||
|
self.checkSame(db, stb, "sum(tdc)", 3020.234999999780030)
|
||||||
|
self.checkSame(db, stb, "sum(tti)", -100000)
|
||||||
|
self.checkSame(db, stb, "sum(tsi)", -85000)
|
||||||
|
self.checkSame(db, stb, "sum(tic)", -4795000)
|
||||||
|
self.checkSame(db, stb, "sum(tbi)", -1125000)
|
||||||
|
self.checkSame(db, stb, "sum(tuti)", 475000)
|
||||||
|
self.checkSame(db, stb, "sum(tusi)", 460000)
|
||||||
|
self.checkSame(db, stb, "sum(tui)", 520000)
|
||||||
|
self.checkSame(db, stb, "sum(tubi)", 43155000)
|
||||||
|
self.checkSame(db, stb, "last(tbin)", "ywkc")
|
||||||
|
self.checkSame(db, stb, "last(tnch)", "kEoWzCBj")
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
# database
|
# database
|
||||||
|
@ -89,7 +108,6 @@ class TDTestCase(TBase):
|
||||||
# verify db
|
# verify db
|
||||||
self.verifyResult(db)
|
self.verifyResult(db)
|
||||||
|
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
tdSql.close()
|
tdSql.close()
|
||||||
tdLog.success("%s successfully executed" % __file__)
|
tdLog.success("%s successfully executed" % __file__)
|
||||||
|
|
Loading…
Reference in New Issue