xwmr-max commented on code in PR #6440:
URL: https://github.com/apache/iceberg/pull/6440#discussion_r1118792114
##########
flink/v1.15/flink/src/main/java/org/apache/iceberg/flink/source/IcebergTableSource.java:
##########
@@ -226,4 +229,21 @@ public DynamicTableSource copy() {
public String asSummaryString() {
return "Iceberg table source";
}
+
+ @Override
+ public LookupRuntimeProvider getLookupRuntimeProvider(LookupContext context)
{
+ String[] lookupKeys = new String[context.getKeys().length];
+ for (int i = 0; i < lookupKeys.length; i++) {
+ int[] innerKeyArr = context.getKeys()[i];
+ Preconditions.checkArgument(
+ innerKeyArr.length == 1, "Don't support nested lookup keys in
iceberg now.");
+ lookupKeys[i] = schema.getFieldNames()[innerKeyArr[0]];
+ }
+
+ TableSchema projectedSchema = getProjectedSchema();
+ loader.open();
Review Comment:
This problem does exist with `tableloader `at present. Therefore, I try to
avoid this problem by calling `tableloader.open () `when I load the table. If
this problem is to be solved completely, it needs to be solved fundamentally
from `tableloader `and I will continue to pay attention to this problem.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]