Refactor Java Hive and Iceberg Connector for Prestissimo Iceberg Connector#21662
Conversation
66cffe5 to
9e2428b
Compare
There was a problem hiding this comment.
You don't need to cast to HiveColumnHandle
Set<String> relevantColumns = tableHandle.getPartitionColumns().stream()
.map(BaseHiveColumnHandle::getName)
There was a problem hiding this comment.
You don't need to cast to HiveColumnHandle
Set<String> relevantColumns = tableHandle.getPartitionColumns().stream()
.map(BaseHiveColumnHandle::getName)
There was a problem hiding this comment.
We don't usually do upcasts in the child classes. I think it's better to change the parameter partitionColumns to List<BaseColumnHandle>
There was a problem hiding this comment.
Change
public Builder setPartitionColumns(List<HiveColumnHandle> partitionColumns)
to
public Builder setPartitionColumns(List<BaseHiveColumnHandle> partitionColumns)
and do downcast inside.
9e2428b to
9c7bd6b
Compare
9c7bd6b to
c67f699
Compare
There was a problem hiding this comment.
getSchemaTableName() is already in BaseHiveTableHandle. Do we still need it here?
There was a problem hiding this comment.
We can make HivePartitionResult.partitionColumns List<HiveColumnHandle>, and make hivePartitionResult.getPartitionColumns() return List<BaseHiveColumnHandle>, and also make the constructor of HivePartitionResult take List<BaseHiveColumnHandle> parameter.
There was a problem hiding this comment.
change the constructor parameter partitionColumns to List<BaseHiveColumnHandle> instead of doing upcasting here
There was a problem hiding this comment.
As discussed offline, we won't be able to make this change in the JSON constructor since we don't want the information to get lost while serializing.
c67f699 to
2cef922
Compare
presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergTableHandle.java
Outdated
Show resolved
Hide resolved
Refactor HiveTableHandle and IcebergTableHandle to extend BaseHiveTableHandle
2cef922 to
9be76e6
Compare
9be76e6 to
a3ebbb4
Compare
Description
Related to #21584
Motivation and Context
facebookincubator/velox#5977
Impact
N.A.
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.