ferenc-csaky commented on code in PR #39:
URL:
https://github.com/apache/flink-connector-http/pull/39#discussion_r3161351273
##########
flink-connector-http/src/main/java/org/apache/flink/connector/http/table/lookup/HttpLookupTableSourceFactory.java:
##########
@@ -220,12 +221,16 @@ private HttpLookupConfig getHttpLookupOptions(Context
context, ReadableConfig re
HttpPostRequestCallbackFactory.class,
readableConfig.get(REQUEST_CALLBACK_IDENTIFIER));
+ // Convert ReadableConfig to Configuration for serialization
+ Configuration configuration = new Configuration();
+ readableConfig.toMap().forEach(configuration::setString);
+
return HttpLookupConfig.builder()
.lookupMethod(readableConfig.get(LOOKUP_METHOD))
.url(readableConfig.get(URL))
.useAsync(readableConfig.get(ASYNC_POLLING))
.properties(httpConnectorProperties)
- .readableConfig(readableConfig)
+ .readableConfig(configuration)
Review Comment:
We should be able to simplify this to:
```java
.readableConfig(Configuration.fromMap(readableConfig.toMap()))
```
It does the same thing inside that now happens in L225-226
##########
flink-connector-http/src/main/java/org/apache/flink/connector/http/table/lookup/HttpTableLookupFunction.java:
##########
@@ -111,13 +117,59 @@ public Collection<RowData> lookup(RowData keyRow) {
physicalArity = physicalRow.getArity();
producedRow =
new GenericRowData(physicalRow.getRowKind(), physicalArity
+ metadataArity);
- // We need to copy in the physical row into the producedRow
+ // Build a map of lookup table field names to their typed values
from keyRow
+ // Only process top-level single-value join keys
+ Map<String, Object> joinKeyValues = new HashMap<>();
Review Comment:
so this was not happening until the connector was built with Flink 1.20?
even when runtime was 2.0? i'd like to understand what's going on here.
--
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]