TsukiokaKogane commented on code in PR #63850:
URL: https://github.com/apache/doris/pull/63850#discussion_r3380610265
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/stream/OlapTableStreamWrapper.java:
##########
@@ -32,18 +33,27 @@
import java.util.Collection;
import java.util.List;
import java.util.Map;
+import java.util.stream.Collectors;
// runtime-only class for unified query/insert experience, created when bind
relation with OlapTableStream
public class OlapTableStreamWrapper extends OlapTable {
private OlapTableStream stream;
private OlapTable baseTable;
protected Map<Long, Pair<Long, Long>> outputUpdateMap = Maps.newHashMap();
+ private final KeysType keysType;
public OlapTableStreamWrapper(OlapTableStream stream, OlapTable baseTable)
{
super(stream.getId(), stream.getName(), stream.getFullSchema(),
baseTable.getKeysType(),
baseTable.getPartitionInfo(),
baseTable.getDefaultDistributionInfo());
+ // Inherit base table's qualifiedDbName so that wrapper.getDatabase()
can resolve the
+ // owning Database via
Env.getCurrentInternalCatalog().getDbNullable(qualifiedDbName).
+ // Otherwise downstream consumers (e.g. QueryPartitionCollector,
partition routing,
+ // MV partition compensation) treat the wrapper as having no database
and silently
+ // fall back to empty results when scanning the stream.
+ setQualifiedDbName(baseTable.getQualifiedDbName());
Review Comment:
不是 是下游优化rule QueryPartitionCollector会根据table做查询优化 这里不设置QualifiedDb 会NPE
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]