Task Description
Users should be able to run FlinkSQL queries with read_blob against fields that are OOL blobs. Similar to SparkSQL, our implementation should ideally not send a DFS pread request for each field/row - rather we should aim to group requests in batches and issue API calls for consecutive byte ranges. Specifically, hoodie.blob.batching.max.gap.bytes and hoodie.blob.batching.lookahead.size should still be honored if set by user
Approach
Instead of adding a read_blob UDF,
- Create a iterator wrapper
ClosableIterator that, when next is invoked, loads a batch of hoodie.blob.batching.lookahead.size records, and similar to Spark, sorts them and issues pre-read calls and materializes the blob data in records
- For FlinkV2 - call it in HoodieSplitReaderFunction for each record batch
- For Legacy Flink - call MergeOnReadInputFormat.initIterator
In order for HUDI to be able to infer which blob fields should be "materialized", we can require users to pass in #18958 (comment) blob-related configs in the Flink DDL.
Related Issues
Parent feature issue: (if applicable )
Related issues:
NOTE: Use Relationships button to add parent/blocking issues after issue is created.
Task Description
Users should be able to run FlinkSQL queries with
read_blobagainst fields that are OOL blobs. Similar to SparkSQL, our implementation should ideally not send a DFS pread request for each field/row - rather we should aim to group requests in batches and issue API calls for consecutive byte ranges. Specifically,hoodie.blob.batching.max.gap.bytesandhoodie.blob.batching.lookahead.sizeshould still be honored if set by userApproach
Instead of adding a read_blob UDF,
ClosableIteratorthat, whennextis invoked, loads a batch ofhoodie.blob.batching.lookahead.sizerecords, and similar to Spark, sorts them and issues pre-read calls and materializes the blob data in recordsIn order for HUDI to be able to infer which blob fields should be "materialized", we can require users to pass in #18958 (comment) blob-related configs in the Flink DDL.
Related Issues
Parent feature issue: (if applicable )
Related issues:
NOTE: Use
Relationshipsbutton to add parent/blocking issues after issue is created.