yihua commented on a change in pull request #3893:
URL: https://github.com/apache/hudi/pull/3893#discussion_r799111898



##########
File path: 
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/index/FlinkHoodieIndex.java
##########
@@ -48,22 +47,22 @@ protected FlinkHoodieIndex(HoodieWriteConfig config) {
   @PublicAPIMethod(maturity = ApiMaturityLevel.DEPRECATED)
   public abstract List<WriteStatus> updateLocation(List<WriteStatus> 
writeStatuses,
                                                    HoodieEngineContext context,
-                                                   HoodieTable<T, 
List<HoodieRecord<T>>, List<HoodieKey>, List<WriteStatus>> hoodieTable) throws 
HoodieIndexException;
+                                                   HoodieTable hoodieTable) 
throws HoodieIndexException;
 
   @Override
   @Deprecated
   @PublicAPIMethod(maturity = ApiMaturityLevel.DEPRECATED)
   public abstract List<HoodieRecord<T>> tagLocation(List<HoodieRecord<T>> 
records,
                                                     HoodieEngineContext 
context,
-                                                    HoodieTable<T, 
List<HoodieRecord<T>>, List<HoodieKey>, List<WriteStatus>> hoodieTable) throws 
HoodieIndexException;
+                                                    HoodieTable hoodieTable) 
throws HoodieIndexException;
 
   @Override
   @PublicAPIMethod(maturity = ApiMaturityLevel.EVOLVING)
   public <R> HoodieData<HoodieRecord<R>> tagLocation(
       HoodieData<HoodieRecord<R>> records, HoodieEngineContext context,
       HoodieTable hoodieTable) throws HoodieIndexException {
-    return HoodieList.of(tagLocation(
-        HoodieList.getList(records.map(record -> (HoodieRecord<T>) record)), 
context, hoodieTable));
+    List<HoodieRecord<T>> hoodieRecords = 
tagLocation(HoodieList.getList(records.map(record -> (HoodieRecord<T>) 
record)), context, hoodieTable);
+    return HoodieList.of(hoodieRecords.stream().map(r -> (HoodieRecord<R>) 
r).collect(Collectors.toList()));
   }

Review comment:
       I think this is fine since this is more like an intermediate fix.  Once 
RFC-46 is fully done, the logic here should be much cleaner without generics.




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