Steve Carlin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/22605 )

Change subject: IMPALA-13738 (Part1): Denormalize IcebergTable.getPartialInfo()
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/22605/1/fe/src/main/java/org/apache/impala/catalog/IcebergTable.java
File fe/src/main/java/org/apache/impala/catalog/IcebergTable.java:

http://gerrit.cloudera.org:8080/#/c/22605/1/fe/src/main/java/org/apache/impala/catalog/IcebergTable.java@774
PS1, Line 774:     if (partIds != null || wantPartitionInfo) {
Optional:  I'm not familiar with the Iceberg code and I have my own way of 
doing things...

I like shorter methods and short "if" blocks.

I just kinda like the idea of code like this better, since most of the code 
here is dedicated towards creating a TPartialPartitionInfo object:
if (wantPartitionInfo) {
  TPartialPartitionInfo partInfo = getPartialPartitionInfo(req);
  if (partInfo != null) {
    resp.table_info.partitions = Lists.newArrayList(partInfo);
    if (req.table_info_selector.want_partition_metadata) {
        part.setPartitionMetadata(partInfo);
    }
  }
}

It is more highlighted here that there is one portion of the "if" statement 
that changes state of an internal object (something I never really like, but I 
don't have an alternative), and all the generation code of the thrift object is 
in one place.

Just my 2 cents, totally optional.



--
To view, visit http://gerrit.cloudera.org:8080/22605
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I75d277fb555d0088a2e28111ff529a4605d734fa
Gerrit-Change-Number: 22605
Gerrit-PatchSet: 1
Gerrit-Owner: Noemi Pap-Takacs <npaptak...@cloudera.com>
Gerrit-Reviewer: Daniel Becker <daniel.bec...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <scar...@cloudera.com>
Gerrit-Comment-Date: Mon, 10 Mar 2025 17:30:36 +0000
Gerrit-HasComments: Yes

Reply via email to