[fix](group commit) Fix some wal problems on group commit (#28554)
This commit is contained in:
@ -240,6 +240,7 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
@ -3296,15 +3297,17 @@ public class FrontendServiceImpl implements FrontendService.Iface {
|
||||
return result;
|
||||
}
|
||||
|
||||
Table table = db.getTable(tableId).get();
|
||||
if (table == null) {
|
||||
Table table;
|
||||
try {
|
||||
table = db.getTable(tableId).get();
|
||||
} catch (NoSuchElementException e) {
|
||||
errorStatus.setErrorMsgs(
|
||||
(Lists.newArrayList(String.format("dbId=%d tableId=%d is not exists", dbId, tableId))));
|
||||
result.setStatus(errorStatus);
|
||||
return result;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (Column column : table.getFullSchema()) {
|
||||
for (Column column : table.getBaseSchema(true)) {
|
||||
sb.append(column.getName() + ":" + column.getUniqueId() + ",");
|
||||
}
|
||||
String columnInfo = sb.toString();
|
||||
|
||||
@ -25,7 +25,6 @@ import org.apache.doris.catalog.Column;
|
||||
import org.apache.doris.catalog.Env;
|
||||
import org.apache.doris.catalog.HdfsResource;
|
||||
import org.apache.doris.catalog.MapType;
|
||||
import org.apache.doris.catalog.OlapTable;
|
||||
import org.apache.doris.catalog.PrimitiveType;
|
||||
import org.apache.doris.catalog.ScalarType;
|
||||
import org.apache.doris.catalog.StructField;
|
||||
@ -330,13 +329,9 @@ public abstract class ExternalFileTableValuedFunction extends TableValuedFunctio
|
||||
if (this.fileFormatType == TFileFormatType.FORMAT_WAL) {
|
||||
List<Column> fileColumns = new ArrayList<>();
|
||||
Table table = Env.getCurrentInternalCatalog().getTableByTableId(tableId);
|
||||
List<Column> tableColumns = table.getBaseSchema(false);
|
||||
List<Column> tableColumns = table.getBaseSchema(true);
|
||||
for (int i = 1; i <= tableColumns.size(); i++) {
|
||||
fileColumns.add(new Column("c" + i, tableColumns.get(i - 1).getDataType(), true));
|
||||
}
|
||||
Column deleteSignColumn = ((OlapTable) table).getDeleteSignColumn();
|
||||
if (deleteSignColumn != null) {
|
||||
fileColumns.add(new Column("c" + (tableColumns.size() + 1), deleteSignColumn.getDataType(), true));
|
||||
fileColumns.add(new Column("c" + i, tableColumns.get(i - 1).getType(), true));
|
||||
}
|
||||
return fileColumns;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user