Gabriel39 commented on code in PR #66628:
URL: https://github.com/apache/doris/pull/66628#discussion_r3751758567
##########
fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergConnectorMetadata.java:
##########
@@ -646,7 +646,8 @@ private Table loadTable(ConnectorSession session,
IcebergTableHandle handle) {
try {
return context.executeAuthenticated(() ->
resolveTableForRead(session, handle));
} catch (Exception e) {
- throw new RuntimeException("Failed to load table, error message
is:" + e.getMessage(), e);
+ throw IcebergExceptionUtils.wrapTableLoadFailure(
Review Comment:
Fixed in 73da74405e9. getTableHandle now preserves wrapped
NoSuchTableException as an empty handle and normalizes deeply wrapped Iceberg
NotFoundException failures. The same normalization is applied to SHOW partition
names, listPartitions, and the MVCC partition view. Tests cover the real handle
and SHOW entry paths plus both parallel readers.
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/scan/PluginDrivenScanNode.java:
##########
@@ -221,9 +221,11 @@ public static PluginDrivenScanNode create(PlanNodeId id,
TupleDescriptor desc,
// PluginDrivenSysExternalTable the override returns the connector's
SYSTEM handle (carrying
// sysTableName + forceJni), so the scan path threads force-JNI
correctly for binlog/audit_log.
ConnectorTableHandle handle =
table.resolveConnectorTableHandle(session, metadata)
+ // A missing handle means the remotely resolved table
disappeared; keep connector internals out
+ // of the user-facing error so redirected tables retain the
normal table-not-found contract.
.orElseThrow(() -> new RuntimeException(
- "Table handle not found for plugin-driven table: " +
dbName + "."
- + table.getRemoteName()));
+ "Table '" + catalog.getName() + "." + dbName + "." +
table.getRemoteName()
Review Comment:
Fixed in 73da74405e9. Missing handles now raise the Nereids
AnalysisException before the EXPLAIN boundary and render catalog plus local
database/table names; remote coordinates remain limited to connector
resolution. Mapped normal-table and system-table tests assert the local
identifiers and exception type.
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/scan/PluginDrivenScanNode.java:
##########
@@ -1289,23 +1292,32 @@ void checkSysTableScanConstraints() throws
UserException {
String sysTableName = sysTableName();
if (scanParams.incrementalRead()) {
if (!sysTableSupportsScanParam(p ->
p.supportsSystemTableIncrementalRead(sysTableName))) {
- throw new UserException("Plugin system table '" +
sysTableName
+ throw new UserException(connectorName + " system table '"
+ sysTableName
+ "' does not support INCR scan params.");
}
} else if (scanParams.isOptions()) {
if (!sysTableSupportsScanParam(p ->
p.supportsSystemTableOptions(sysTableName))) {
- throw new UserException("Plugin system table '" +
sysTableName
+ throw new UserException(connectorName + " system table '"
+ sysTableName
+ "' does not support OPTIONS scan params.");
}
} else if (!timeTravelSupported) {
- throw new UserException("Plugin system tables do not support
scan params.");
+ throw new UserException(connectorName + " system tables do not
support scan params.");
}
}
if (getQueryTableSnapshot() != null && !timeTravelSupported) {
- throw new UserException("Plugin system tables do not support time
travel.");
+ throw new UserException(connectorName + " system tables do not
support time travel.");
}
}
+ private String connectorDisplayName() throws UserException {
+ String engine = getTargetTable().getEngine();
+ // The connector identity is part of the user-facing compatibility
contract; the generic plugin layer
+ // must not make equivalent connector errors differ according to which
execution path rejected a scan.
+ return engine == null || engine.isEmpty()
Review Comment:
Fixed in 73da74405e9. The connector-owned nonempty engine display name is
now preserved verbatim. Exact iRODS assertions cover INCR, OPTIONS, generic
scan params, and time travel.
--
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]