Skip to content

Commit 2f082fc

Browse files
authored
LookupSource_TestRename - Source Test name change + remove unused method argument in source factory. (#20)
Signed-off-by: Krzysztof Chmielewski <krzysztof.chmielewski@getindata.com> Signed-off-by: Krzysztof Chmielewski <krzysztof.chmielewski@getindata.com>
1 parent cabdb63 commit 2f082fc

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

src/main/java/com/getindata/connectors/http/internal/table/lookup/HttpLookupTableSourceFactory.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,7 @@ public DynamicTableSource createDynamicTableSource(Context context) {
5454

5555
ReadableConfig readableConfig = helper.getOptions();
5656

57-
ResolvedSchema resolvedSchema = context.getCatalogTable().getResolvedSchema();
58-
DataType physicalRowDataType =
59-
toRowDataType(resolvedSchema.getColumns(), Column::isPhysical);
60-
61-
validateOptions(context, readableConfig, physicalRowDataType);
57+
validateOptions(context, readableConfig);
6258

6359
DecodingFormat<DeserializationSchema<RowData>> decodingFormat =
6460
helper.discoverDecodingFormat(
@@ -69,6 +65,11 @@ public DynamicTableSource createDynamicTableSource(Context context) {
6965
PollingClientFactory<RowData> pollingClientFactory = new RestTablePollingClientFactory();
7066
HttpLookupConfig lookupConfig = getHttpLookupOptions(readableConfig);
7167

68+
ResolvedSchema resolvedSchema = context.getCatalogTable().getResolvedSchema();
69+
70+
DataType physicalRowDataType =
71+
toRowDataType(resolvedSchema.getColumns(), Column::isPhysical);
72+
7273
return new HttpLookupTableSource(
7374
physicalRowDataType,
7475
pollingClientFactory,
@@ -101,10 +102,7 @@ private HttpLookupConfig getHttpLookupOptions(ReadableConfig config) {
101102
}
102103

103104
// TODO FIX There is something ugly here. Verify with DataGenTableSourceFactory and refactor.
104-
private void validateOptions(
105-
Context context,
106-
ReadableConfig readableConfig,
107-
DataType physicalRowDataType) {
105+
private void validateOptions(Context context, ReadableConfig readableConfig) {
108106

109107
Set<ConfigOption<?>> allOptions = new HashSet<>();
110108
allOptions.addAll(optionalOptions());

src/test/java/com/getindata/connectors/http/internal/table/lookup/HttpLookupTableSourceITCaseTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void tearDown() {
6262
}
6363

6464
@Test
65-
public void testHttpDynamicSinkDefaultPost() throws Exception {
65+
public void testHttpLookupJoin() throws Exception {
6666

6767
setupServerStub(wireMockServer);
6868

0 commit comments

Comments
 (0)