[Simplified Version] Add table redirection support to SPI and Hive's redirection to Iceberg#7016
[Simplified Version] Add table redirection support to SPI and Hive's redirection to Iceberg#7016lxynov wants to merge 4 commits intotrinodb:masterfrom
Conversation
|
Curious if you have seen |
@sopel39 |
core/trino-main/src/main/java/io/trino/metadata/MetadataManager.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/metadata/MetadataManager.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/metadata/MetadataManager.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
I'm not sure if we want to do this. may be we can keep these features isolated for now.
core/trino-main/src/main/java/io/trino/sql/rewrite/ShowQueriesRewrite.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
We're now returning a stream version of List<GrantInfo> which's expected to have additional info on tablename and redirection. So may be naming TableGrantInfo instead of ListTablePrivilegesResult is more appropriate?
or using a stream of Map.Entry<SchemaTableName, Optional<GrantInfo>> might be easier to relate with the current listTablePrivileges method?
core/trino-main/src/main/java/io/trino/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
the call verifyNoAggregateWindowOrGroupingFunctions should not use table.getName for error message.
visitTable -> analyzeFiltersAndMasks -> analyzeColumnMasks -> verifyNoAggregateWindowOrGroupingFunctions
There was a problem hiding this comment.
if redirected view doesn't exist, we don't return the original view here. but in the unfiltered case, we don't check whether redirected view exists, so it appears. This seems to introduce another inconsistency between filtered/unfiltered case, right?
this seems to hint towards having another similar api for listViews, but not sure about a good design for it.
core/trino-main/src/main/java/io/trino/metadata/MetadataManager.java
Outdated
Show resolved
Hide resolved
@lxynov Could you elaborate more? We don't need to generate target Hive column handles when redirecting, but just proper column names. I expect during redirection one knows which source column handle maps to which target column name. |
|
@sopel39 Sure. This is to handle the case of redirecting from Hive Connector to Iceberg Connector. To use |
When enabled, Hive Connector would redirect table reads to an Iceberg catalog when it is an Iceberg table.
24e960b to
65e3878
Compare
|
Superseded by #7606 |
Removed DDL, INSERT, COMMENT, ANALYZE, etc. support w.r.t. #5160.
The engine tries to do redirection only for table reads and metadata listing in this PR.