Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1242,8 +1242,9 @@ public void analyzeGroupCommit(Analyzer analyzer) throws AnalysisException {
for (Expr expr : row) {
if (!(expr instanceof LiteralExpr)) {
if (LOG.isDebugEnabled()) {
LOG.debug("group commit is off for table: {}, because not literal expr, "
+ "expr: {}, row: {}", targetTable.getName(), expr, row);
LOG.debug("group commit is off for query_id: {}, table: {}, "
+ "because not literal expr: {}, row: {}",
DebugUtil.printId(ctx.queryId()), targetTable.getName(), expr, row);
}
return;
}
Expand All @@ -1252,8 +1253,9 @@ public void analyzeGroupCommit(Analyzer analyzer) throws AnalysisException {
// Does not support: insert into tbl values();
if (selectStmt.getValueList().getFirstRow().isEmpty() && CollectionUtils.isEmpty(targetColumnNames)) {
if (LOG.isDebugEnabled()) {
LOG.debug("group commit is off for table: {}, because first row: {}, target columns: {}",
targetTable.getName(), selectStmt.getValueList().getFirstRow(), targetColumnNames);
LOG.debug("group commit is off for query_id: {}, table: {}, because first row: {}, "
+ "target columns: {}", DebugUtil.printId(ctx.queryId()), targetTable.getName(),
selectStmt.getValueList().getFirstRow(), targetColumnNames);
}
return;
}
Expand All @@ -1265,8 +1267,10 @@ public void analyzeGroupCommit(Analyzer analyzer) throws AnalysisException {
for (SelectListItem item : items) {
if (item.getExpr() != null && !(item.getExpr() instanceof LiteralExpr)) {
if (LOG.isDebugEnabled()) {
LOG.debug("group commit is off for table: {}, because not literal expr, "
+ "expr: {}, row: {}", targetTable.getName(), item.getExpr(), item);
LOG.debug("group commit is off for query_id: {}, table: {}, "
+ "because not literal expr: {}, row: {}",
DebugUtil.printId(ctx.queryId()), targetTable.getName(), item.getExpr(),
item);
}
return;
}
Expand All @@ -1279,8 +1283,8 @@ public void analyzeGroupCommit(Analyzer analyzer) throws AnalysisException {
if (LOG.isDebugEnabled()) {
for (Pair<BooleanSupplier, Supplier<String>> pair : conditions) {
if (pair.first.getAsBoolean() == false) {
LOG.debug("group commit is off for table: {}, because: {}", targetTable.getName(),
pair.second.get());
LOG.debug("group commit is off for query_id: {}, table: {}, because: {}",
DebugUtil.printId(ctx.queryId()), targetTable.getName(), pair.second.get());
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,16 @@ protected static void analyzeGroupCommit(ConnectContext ctx, TableIf table, Logi
if (!ctx.isGroupCommit() && LOG.isDebugEnabled()) {
for (Pair<BooleanSupplier, Supplier<String>> pair : conditions) {
if (pair.first.getAsBoolean() == false) {
LOG.debug("group commit is off for table: {}, because: {}", table.getName(), pair.second.get());
LOG.debug("group commit is off for query_id: {}, table: {}, because: {}",
DebugUtil.printId(ctx.queryId()), table.getName(), pair.second.get());
break;
}
}
}
} else {
if (LOG.isDebugEnabled()) {
LOG.debug("group commit is off because for table: {}, because logicalQuery class: {}", table.getName(),
logicalQuery.getClass().getName());
LOG.debug("group commit is off for query_id: {}, table: {}, because logicalQuery class: {}",
DebugUtil.printId(ctx.queryId()), table.getName(), logicalQuery.getClass().getName());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,14 +366,14 @@ public static InternalService.PDataRow getRowStringValue(List<Expr> cols,
if (expr instanceof NullLiteral) {
row.addColBuilder().setValue(NULL_VALUE_FOR_LOAD);
} else if (expr instanceof ArrayLiteral) {
row.addColBuilder().setValue(String.format("\"%s\"", expr.getStringValueForStreamLoad(options)));
row.addColBuilder().setValue("\"" + expr.getStringValueForStreamLoad(options) + "\"");
} else {
String stringValue = expr.getStringValueForStreamLoad(options);
if (stringValue.equals(NULL_VALUE_FOR_LOAD) || stringValue.startsWith("\"") || stringValue.endsWith(
"\"")) {
row.addColBuilder().setValue(String.format("\"%s\"", stringValue));
row.addColBuilder().setValue("\"" + stringValue + "\"");
} else {
row.addColBuilder().setValue(String.format("%s", stringValue));
row.addColBuilder().setValue(stringValue);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ suite("txn_insert_concurrent_insert") {
futures.add(future)
}
CompletableFuture<?>[] futuresArray = futures.toArray(new CompletableFuture[0])
CompletableFuture.allOf(futuresArray).get(3, TimeUnit.MINUTES)
CompletableFuture.allOf(futuresArray).get(10, TimeUnit.MINUTES)
sql """ sync """

def result = sql """ select count() from ${tableName}_0 """
Expand Down