suxiaogang223 commented on code in PR #68837:
URL: https://github.com/apache/doris/pull/68837#discussion_r4249931663
##########
fe/fe-core/src/main/java/org/apache/doris/qe/CoordinatorContext.java:
##########
@@ -276,7 +276,8 @@ public QueryProcessor asQueryProcessor() {
public static CoordinatorContext buildForSql(NereidsPlanner planner,
NereidsCoordinator coordinator) {
ConnectContext connectContext =
planner.getCascadesContext().getConnectContext();
- TQueryOptions queryOptions = initQueryOptions(connectContext);
+ TQueryOptions queryOptions = initQueryOptions(
+ connectContext, planner.getQueryOptions().getBeExecVersion());
Review Comment:
Fixed in 1aa38c0c543. The statement-scoped BE execution version is now
carried by ScanContext and reused by PluginDrivenScanNode for OpenCSVSerde and
Variant admission. Connector write planning receives the same pinned value, and
the legacy Coordinator now builds query options from the version captured by
the planner instead of rereading Config.be_exec_version. Therefore feature
admission and the dispatched execution version can no longer diverge.
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java:
##########
@@ -3719,6 +3720,24 @@ private void addPlanRoot(PlanFragment fragment, PlanNode
planNode, AbstractPlan
updateLegacyPlanIdToPhysicalPlan(planNode, physicalPlan);
}
+ @VisibleForTesting
+ static DataPartition createHiveTableSinkDataPartition(
+ List<Expr> partitionExprs, int beExecVersion) {
+ if (partitionExprs.isEmpty()) {
+ TPartitionType type = beExecVersion
+ <
Config.ALIGNED_EXTERNAL_TABLE_SINK_THRIFT_MIN_BE_EXEC_VERSION
+ ? TPartitionType.EXTERNAL_TABLE_SINK_UNPARTITIONED
+ : TPartitionType.HIVE_TABLE_SINK_UNPARTITIONED;
+ return new DataPartition(type);
+ }
+ if (beExecVersion <
Config.ALIGNED_EXTERNAL_TABLE_SINK_THRIFT_MIN_BE_EXEC_VERSION) {
+ return new
DataPartition(TPartitionType.EXTERNAL_TABLE_SINK_HASH_PARTITIONED,
Review Comment:
We intentionally do not preserve the version-8-to-12 Hive routing dialect in
master. Thrift value 7 has conflicting historical meanings: Hive hash routing
in 4.0 and external-table hash routing in 4.1/4.2. Supporting the scenario
described here would require the current master BE to reinterpret the same enum
value according to be_exec_version, which is precisely the unpublished
intermediate-state compatibility that this cleanup removes. The supported
upgrade sequence reaches master through 4.1/4.2, whose external-routing
execution version is at least 13. For a master query manually pinned below 13,
external hash routing now fails explicitly with NotSupported instead of
guessing that value 7 means Hive. No code change is intended for this case.
--
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]