Flink: Support Lookup join#17280
Conversation
ce9c20e to
dab7749
Compare
dab7749 to
e22d9eb
Compare
|
@mxm, @swapna267: What do you think? Would this be a feature which is needed for the source? |
|
In our use case, dimension tables are synced from MySQL to Iceberg. Currently, we do lookup joins directly against MySQL. But this creates too many concurrent connections to MySQL, putting a lot of pressure on it. Since the same data already exists in Iceberg, we could do lookup joins directly against Iceberg instead.In our case, the dimension tables are small, so a full-cache (or partial cache) based lookup join should work well enough. For larger dimension tables where full caching isn't feasible, we may need indexing features that are being discussed for Iceberg V4. This can be explored later. |
|
Thanks @Guosmilesmile . Yeah , i see some scenarios where this feature can be useful on source in our use cases when CDC is enabled on MySQL tables. I am not fully aware of how Lookup source interacts with sources in general. I have concerns about the table size. Looking to understand,
|
|
Summary
This PR adds lookup join support for Iceberg Flink table source, including both partial lookup cache, and full lookup cache with optional periodic refresh.
The implementation enables Iceberg tables to be used as temporal lookup join dimensions in Flink SQL.
Supported Features
Lookup join against Iceberg table source
Lookup key filtering
NULLlookup keys are handled correctly withIS NULLsemantics.Pushed-down filter support
Partial lookup cache
DefaultLookupCacheandPartialCachingLookupProvider.Full lookup cache
Periodic refresh for full lookup cache
How to Use
Basic lookup join
Lookup join with partial cache
Lookup join with full cache
or
Full cache with periodic refresh
Behavior by cache mode:
lookup.cache = PARTIALDefaultLookupCache.lookup.cache = FULLlookup.full-cache.periodic-reload.intervalis configured, the cache is reloaded periodically.