github-actions[bot] commented on code in PR #69829:
URL: https://github.com/apache/doris/pull/69829#discussion_r4410243961
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/mvcc/PluginDrivenMvccExternalTable.java:
##########
@@ -522,6 +522,12 @@ private MvccSnapshot loadSnapshotInternal(
Optional<TableSnapshot> tableSnapshot,
Optional<TableScanParams> scanParams,
Optional<MvccSnapshot> latestSnapshotFence) {
+ // Views have their own schema and no table snapshot. Binding expands
the view SQL and rejects
+ // time travel; resolving a table handle here would load the view name
through the table API.
+ if (isView()) {
Review Comment:
[P2] Reject view scan parameters before returning an empty snapshot
For an Iceberg view `v`, `SELECT * FROM ctl.db.v@tag('name'='old')`
(likewise `@branch` or `@incr`) now returns the current view result instead of
failing. `StatementContext.loadSnapshots` reaches this branch before selector
resolution, and `BindRelation` only rejects `getTableSnapshot()`; its view
expansion drops `getScanParams()`. Previously the explicit-selector path
attempted to resolve a table handle and failed for a view. Reject view scan
parameters before this return so an explicit historical/incremental request
cannot silently become an ordinary current query, and add negative binder tests
alongside the no-selector success 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]