Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

continued ci test for insert stb #23372

Merged
merged 52 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
8532227
fix: first schema clause top - target is supertable
shenglian-zhou Oct 19, 2023
334feb1
call processTableSchemaFromMetaData when success
shenglian-zhou Oct 19, 2023
cb2311f
fix minior error
shenglian-zhou Oct 19, 2023
332268f
set super table name for stb syntax and rename setRefreshMate to setR…
shenglian-zhou Oct 19, 2023
ce6be3d
fix: refactor checkAuth for target table
shenglian-zhou Oct 20, 2023
3fe5c44
enhance: begin parse cols
shenglian-zhou Oct 20, 2023
438a775
fix: parse insert stb columns when meta is ready or ready after get meta
shenglian-zhou Oct 21, 2023
6488672
enhance: parse target column
shenglian-zhou Oct 22, 2023
5156c0d
enhance: get tbname from one row for stb syntax
shenglian-zhou Oct 22, 2023
e713b7c
enhance: insert stb skeleton development
shenglian-zhou Oct 23, 2023
0cfbcd7
Merge branch '3.0' of github.com:taosdata/TDengine into szhou/continu…
shenglian-zhou Oct 23, 2023
8cdcc42
enhance: add comments to SVnodeModifyOpStmt
shenglian-zhou Oct 23, 2023
65cfc13
fix: memory sanitizer error
shenglian-zhou Oct 23, 2023
ae8d5a5
Merge branch 'szhou/continue-coing' of github.com:taosdata/TDengine i…
shenglian-zhou Oct 23, 2023
ae1bac2
enhance: finished skeleton
shenglian-zhou Oct 24, 2023
27302f9
fix: add memory free
shenglian-zhou Oct 24, 2023
0c33a3e
fix: child table meta optimization
shenglian-zhou Oct 25, 2023
a28b3a6
fix: refactor
shenglian-zhou Oct 25, 2023
c9d1553
enhance: refactor stb rows data context
shenglian-zhou Oct 25, 2023
3de5b84
fix: large file by batches
shenglian-zhou Oct 25, 2023
f0a44b3
fix: insert into super table syntax is not supported for stmt
shenglian-zhou Oct 25, 2023
c173005
fix: memory sanitizer error of simple insert stb
shenglian-zhou Oct 25, 2023
29db21a
fix: reinit ctb meta and col vals before each stb row
shenglian-zhou Oct 25, 2023
1135d31
enhance: add test case
shenglian-zhou Oct 25, 2023
6134346
enhance: test case insert_stb.sim
shenglian-zhou Oct 25, 2023
04a9f59
Merge branch '3.0' of github.com:taosdata/TDengine into szhou/insert-…
shenglian-zhou Oct 25, 2023
efe480a
Merge branch 'szhou/continue-coing' into szhou/insert-stb-tbname
shenglian-zhou Oct 25, 2023
5ca39f9
fix: add error test case and fix address sanitizer
shenglian-zhou Oct 25, 2023
503761a
enhance: add test case
shenglian-zhou Oct 25, 2023
779c37b
enhance: change to invalid operation for stmt error
shenglian-zhou Oct 26, 2023
e1515e8
Merge branch '3.0' of github.com:taosdata/TDengine into szhou/insert-…
shenglian-zhou Oct 27, 2023
65386ed
enhance: add test case
shenglian-zhou Oct 27, 2023
42618a9
enhance: add test case
shenglian-zhou Oct 27, 2023
5b944c4
Merge branch '3.0' of github.com:taosdata/TDengine into szhou/insert-…
shenglian-zhou Oct 27, 2023
8c2deef
Merge branch '3.0' of github.com:taosdata/TDengine into szhou/continu…
shenglian-zhou Oct 30, 2023
e9a7f6e
fix: invalid schema error
shenglian-zhou Oct 30, 2023
45ae372
fix: performace improvement
shenglian-zhou Oct 31, 2023
1686c70
fix: not use ctb meta from hash of stmt node
shenglian-zhou Oct 31, 2023
c8767f7
enhance: tbname token optimization
shenglian-zhou Oct 31, 2023
9a4e4dd
fix: insert stb test to add one binary column
shenglian-zhou Oct 31, 2023
8d2d473
Merge branch 'szhou/insert-stb-tbname' into szhou/continue-coing
shenglian-zhou Oct 31, 2023
041ef1e
enhance: colvals of table data cxt is not used in insert stb syntax
shenglian-zhou Oct 31, 2023
a5d4cf1
fix: modify makefile to remove insert_stb
shenglian-zhou Oct 31, 2023
670a95f
fix: performance test
shenglian-zhou Oct 31, 2023
7636f09
enhance: refactor getStbRowValues
shenglian-zhou Nov 1, 2023
42a7553
enhance: refactor getStbRowValues
shenglian-zhou Nov 1, 2023
efb0c61
fix: fix compilation error
shenglian-zhou Nov 1, 2023
4806480
enhance: add test case
shenglian-zhou Nov 1, 2023
bd64b91
fix: fix address sanitizer error
shenglian-zhou Nov 1, 2023
4a2c527
Merge branch '3.0' of github.com:taosdata/TDengine into szhou/insert-…
shenglian-zhou Nov 1, 2023
5f52f89
restart ci
shenglian-zhou Nov 1, 2023
9b6e447
restart ci
shenglian-zhou Nov 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 10 additions & 5 deletions include/libs/nodes/querynodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ typedef struct SVgDataBlocks {

typedef void (*FFreeTableBlockHash)(SHashObj*);
typedef void (*FFreeVgourpBlockArray)(SArray*);

struct SStbRowsDataContext;
typedef void (*FFreeStbRowsDataContext)(struct SStbRowsDataContext*);
typedef struct SVnodeModifyOpStmt {
ENodeType nodeType;
ENodeType sqlNodeType;
Expand All @@ -443,18 +444,22 @@ typedef struct SVnodeModifyOpStmt {
struct STableMeta* pTableMeta;
SNode* pTagCond;
SArray* pTableTag;
SHashObj* pVgroupsHashObj;
SHashObj* pVgroupsHashObj; // SHashObj<vgId, SVgInfo>
SHashObj* pTableBlockHashObj; // SHashObj<tuid, STableDataCxt*>
SHashObj* pSubTableHashObj;
SHashObj* pTableNameHashObj;
SHashObj* pDbFNameHashObj;
SHashObj* pSubTableHashObj; // SHashObj<table_name, STableMeta*>
SHashObj* pTableNameHashObj; // set of table names for refreshing meta, sync mode
SHashObj* pDbFNameHashObj; // set of db names for refreshing meta, sync mode
SArray* pVgDataBlocks; // SArray<SVgroupDataCxt*>
SVCreateTbReq* pCreateTblReq;
TdFilePtr fp;
FFreeTableBlockHash freeHashFunc;
FFreeVgourpBlockArray freeArrayFunc;
bool usingTableProcessing;
bool fileProcessing;

bool stbSyntax;
struct SStbRowsDataContext* pStbRowsCxt;
FFreeStbRowsDataContext freeStbRowsCxtFunc;
} SVnodeModifyOpStmt;

typedef struct SExplainOptions {
Expand Down
4 changes: 4 additions & 0 deletions source/libs/nodes/src/nodesUtilFuncs.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,10 @@ void nodesDestroyNode(SNode* pNode) {
}
tdDestroySVCreateTbReq(pStmt->pCreateTblReq);
taosMemoryFreeClear(pStmt->pCreateTblReq);
if (pStmt->freeStbRowsCxtFunc) {
pStmt->freeStbRowsCxtFunc(pStmt->pStbRowsCxt);
}
taosMemoryFreeClear(pStmt->pStbRowsCxt);
taosCloseFile(&pStmt->fp);
break;
}
Expand Down
3 changes: 2 additions & 1 deletion source/libs/parser/inc/parInsertUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ int16_t insFindCol(struct SToken *pColname, int16_t start, int16_t end, SSchema
void insBuildCreateTbReq(SVCreateTbReq *pTbReq, const char *tname, STag *pTag, int64_t suid, const char *sname,
SArray *tagName, uint8_t tagNum, int32_t ttl);
int32_t insInitBoundColsInfo(int32_t numOfBound, SBoundColInfo *pInfo);
void insInitColValues(STableMeta* pTableMeta, SArray* aColValues);
void insCheckTableDataOrder(STableDataCxt *pTableCxt, TSKEY tsKey);
int32_t insGetTableDataCxt(SHashObj *pHash, void *id, int32_t idLen, STableMeta *pTableMeta,
SVCreateTbReq **pCreateTbReq, STableDataCxt **pTableCxt, bool colMode);
SVCreateTbReq **pCreateTbReq, STableDataCxt **pTableCxt, bool colMode, bool ignoreColVals);
int32_t initTableColSubmitData(STableDataCxt *pTableCxt);
int32_t insMergeTableDataCxt(SHashObj *pTableHash, SArray **pVgDataBlocks);
int32_t insBuildVgDataBlocks(SHashObj *pVgroupsHashObj, SArray *pVgDataBlocks, SArray **pDataBlocks);
Expand Down
4 changes: 2 additions & 2 deletions source/libs/parser/src/parInsertSml.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ STableDataCxt* smlInitTableDataCtx(SQuery* query, STableMeta* pTableMeta) {
STableDataCxt* pTableCxt = NULL;
SVCreateTbReq* pCreateTbReq = NULL;
int ret = insGetTableDataCxt(((SVnodeModifyOpStmt*)(query->pRoot))->pTableBlockHashObj, &pTableMeta->uid,
sizeof(pTableMeta->uid), pTableMeta, &pCreateTbReq, &pTableCxt, false);
sizeof(pTableMeta->uid), pTableMeta, &pCreateTbReq, &pTableCxt, false, false);
if (ret != TSDB_CODE_SUCCESS) {
return NULL;
}
Expand Down Expand Up @@ -305,7 +305,7 @@ int32_t smlBindData(SQuery* query, bool dataFormat, SArray* tags, SArray* colsSc

STableDataCxt* pTableCxt = NULL;
ret = insGetTableDataCxt(((SVnodeModifyOpStmt*)(query->pRoot))->pTableBlockHashObj, &pTableMeta->uid,
sizeof(pTableMeta->uid), pTableMeta, &pCreateTblReq, &pTableCxt, false);
sizeof(pTableMeta->uid), pTableMeta, &pCreateTblReq, &pTableCxt, false, false);
if (ret != TSDB_CODE_SUCCESS) {
buildInvalidOperationMsg(&pBuf, "insGetTableDataCxt error");
goto end;
Expand Down