Skip to content

Commit ed5a600

Browse files
authored
Pipe: Fix Active Load not getting DataBaseName correctly (#15551)
1 parent 0f22239 commit ed5a600

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileAnalyzer.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,16 @@ private boolean doAsyncLoad(final IAnalysis analysis) {
294294
}
295295

296296
try {
297-
if (Objects.nonNull(databaseForTableData)) {
298-
loadTsFilesAsyncToTargetDir(new File(targetFilePath, databaseForTableData), tsFiles);
297+
if (Objects.nonNull(databaseForTableData)
298+
|| (Objects.nonNull(context) && context.getDatabaseName().isPresent())) {
299+
loadTsFilesAsyncToTargetDir(
300+
new File(
301+
targetFilePath,
302+
databaseForTableData =
303+
Objects.nonNull(databaseForTableData)
304+
? databaseForTableData
305+
: context.getDatabaseName().get()),
306+
tsFiles);
299307
} else {
300308
loadTsFilesAsyncToTargetDir(new File(targetFilePath), tsFiles);
301309
}

0 commit comments

Comments
 (0)