fix: error in data precision of super table query
This commit is contained in:
parent
44b00ed346
commit
7511bfbada
|
@ -298,14 +298,12 @@ TEST_F(ParserInitialCTest, createStable) {
|
||||||
|
|
||||||
auto setCreateStbReqFunc = [&](const char* pTbname, int8_t igExists = 0,
|
auto setCreateStbReqFunc = [&](const char* pTbname, int8_t igExists = 0,
|
||||||
float xFilesFactor = TSDB_DEFAULT_ROLLUP_FILE_FACTOR,
|
float xFilesFactor = TSDB_DEFAULT_ROLLUP_FILE_FACTOR,
|
||||||
int32_t delay = TSDB_DEFAULT_ROLLUP_DELAY, int32_t ttl = TSDB_DEFAULT_TABLE_TTL,
|
int32_t ttl = TSDB_DEFAULT_TABLE_TTL, const char* pComment = nullptr) {
|
||||||
const char* pComment = nullptr) {
|
|
||||||
memset(&expect, 0, sizeof(SMCreateStbReq));
|
memset(&expect, 0, sizeof(SMCreateStbReq));
|
||||||
int32_t len = snprintf(expect.name, sizeof(expect.name), "0.test.%s", pTbname);
|
int32_t len = snprintf(expect.name, sizeof(expect.name), "0.test.%s", pTbname);
|
||||||
expect.name[len] = '\0';
|
expect.name[len] = '\0';
|
||||||
expect.igExists = igExists;
|
expect.igExists = igExists;
|
||||||
expect.xFilesFactor = xFilesFactor;
|
expect.xFilesFactor = xFilesFactor;
|
||||||
expect.delay = delay;
|
|
||||||
expect.ttl = ttl;
|
expect.ttl = ttl;
|
||||||
if (nullptr != pComment) {
|
if (nullptr != pComment) {
|
||||||
expect.comment = strdup(pComment);
|
expect.comment = strdup(pComment);
|
||||||
|
@ -393,7 +391,7 @@ TEST_F(ParserInitialCTest, createStable) {
|
||||||
addFieldToCreateStbReqFunc(false, "id", TSDB_DATA_TYPE_INT);
|
addFieldToCreateStbReqFunc(false, "id", TSDB_DATA_TYPE_INT);
|
||||||
run("CREATE STABLE t1(ts TIMESTAMP, c1 INT) TAGS(id INT)");
|
run("CREATE STABLE t1(ts TIMESTAMP, c1 INT) TAGS(id INT)");
|
||||||
|
|
||||||
setCreateStbReqFunc("t1", 1, 0.1, 2, 100, "test create table");
|
setCreateStbReqFunc("t1", 1, 0.1, 100, "test create table");
|
||||||
addFieldToCreateStbReqFunc(true, "ts", TSDB_DATA_TYPE_TIMESTAMP, 0, 0);
|
addFieldToCreateStbReqFunc(true, "ts", TSDB_DATA_TYPE_TIMESTAMP, 0, 0);
|
||||||
addFieldToCreateStbReqFunc(true, "c1", TSDB_DATA_TYPE_INT);
|
addFieldToCreateStbReqFunc(true, "c1", TSDB_DATA_TYPE_INT);
|
||||||
addFieldToCreateStbReqFunc(true, "c2", TSDB_DATA_TYPE_UINT);
|
addFieldToCreateStbReqFunc(true, "c2", TSDB_DATA_TYPE_UINT);
|
||||||
|
@ -431,7 +429,7 @@ TEST_F(ParserInitialCTest, createStable) {
|
||||||
"TAGS (a1 TIMESTAMP, a2 INT, a3 INT UNSIGNED, a4 BIGINT, a5 BIGINT UNSIGNED, a6 FLOAT, a7 DOUBLE, "
|
"TAGS (a1 TIMESTAMP, a2 INT, a3 INT UNSIGNED, a4 BIGINT, a5 BIGINT UNSIGNED, a6 FLOAT, a7 DOUBLE, "
|
||||||
"a8 BINARY(20), a9 SMALLINT, a10 SMALLINT UNSIGNED COMMENT 'test column comment', a11 TINYINT, "
|
"a8 BINARY(20), a9 SMALLINT, a10 SMALLINT UNSIGNED COMMENT 'test column comment', a11 TINYINT, "
|
||||||
"a12 TINYINT UNSIGNED, a13 BOOL, a14 NCHAR(30), a15 VARCHAR(50)) "
|
"a12 TINYINT UNSIGNED, a13 BOOL, a14 NCHAR(30), a15 VARCHAR(50)) "
|
||||||
"TTL 100 COMMENT 'test create table' SMA(c1, c2, c3) ROLLUP (MIN) FILE_FACTOR 0.1 DELAY 2");
|
"TTL 100 COMMENT 'test create table' SMA(c1, c2, c3) ROLLUP (MIN) FILE_FACTOR 0.1");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ParserInitialCTest, createStream) {
|
TEST_F(ParserInitialCTest, createStream) {
|
||||||
|
|
Loading…
Reference in New Issue