TheR1sing3un commented on code in PR #12531:
URL: https://github.com/apache/hudi/pull/12531#discussion_r1896382467


##########
hudi-common/src/main/java/org/apache/hudi/common/util/collection/RocksDBDAO.java:
##########
@@ -378,9 +416,10 @@ public <T extends Serializable> Stream<Pair<String, T>> 
prefixSearch(String colu
    * Return Iterator of key-value pairs from RocksIterator.
    *
    * @param columnFamilyName Column Family Name
-   * @param <T>              Type of value stored
+   * @param <T>              Type of key stored
+   * @param <R>              Type of value stored
    */
-  public <T extends Serializable> Iterator<T> iterator(String 
columnFamilyName) {
+  public <T extends Serializable, R extends Serializable> Iterator<Pair<T, R>> 
iterator(String columnFamilyName) {

Review Comment:
   Why I refactor this?
   1. This is an mistake because the method comment says to return all 
Key-value pairs, but only value is returned. It makes more sense to return 
key-value pairs here.
   2. If I do not return key-value pairs, I cannot filter the keys after 
`RocksDbDiskMap::iterator(filter)`



-- 
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]

Reply via email to