[fix](group commit) Fix some group commit problems (#27769)

This commit is contained in:
meiyi
2023-11-29 23:43:21 +08:00
committed by GitHub
parent d96e2dfefb
commit 1f9aa8ab16
13 changed files with 363 additions and 246 deletions

View File

@ -253,7 +253,7 @@ public class NativeInsertStmt extends InsertStmt {
OlapTable olapTable = (OlapTable) table;
tblName.setDb(olapTable.getDatabase().getFullName());
tblName.setTbl(olapTable.getName());
if (olapTable.getKeysType() == KeysType.UNIQUE_KEYS) {
if (olapTable.getKeysType() == KeysType.UNIQUE_KEYS || olapTable.getTableProperty().storeRowColumn()) {
List<Column> columns = Lists.newArrayList(olapTable.getBaseSchema(true));
targetColumnNames = columns.stream().map(c -> c.getName()).collect(Collectors.toList());
}

View File

@ -178,12 +178,11 @@ public class InsertIntoTableCommand extends Command implements ForwardWithSync,
}
OlapTableSink sink = ((OlapTableSink) planner.getFragments().get(0).getSink());
if (ctx.getSessionVariable().isEnableInsertGroupCommit()) {
// group commit
if (analyzeGroupCommit(sink, physicalOlapTableSink)) {
handleGroupCommit(ctx, sink, physicalOlapTableSink);
return;
}
// group commit
if (analyzeGroupCommit(sink, physicalOlapTableSink)) {
/*handleGroupCommit(ctx, sink, physicalOlapTableSink);
return;*/
throw new AnalysisException("group commit is not supported in nereids now");
}
Preconditions.checkArgument(!isTxnBegin, "an insert command cannot create more than one txn");
Transaction txn = new Transaction(ctx,