beryllw commented on issue #1412: URL: https://github.com/apache/fluss/issues/1412#issuecomment-3130445163
When user initiates a write request containing a record with fields: ``` dt: '20250728', user_id: 'prefix_look_up_paimon_test', order_id: '1', log_time: 1 ``` The Flink Client encodes this record into a Paimon-formatted WriteRecord, structured as: ``` key: [byte 1 (Paimon Insert)][offset/len for 'prefix_look_up_paimon_test']['1' UTF-8 bytes]['prefix_look_up_paimon_test' UTF-8 bytes] bucket_key:[byte 1 (Paimon Insert)][offset/len for 'prefix_look_up_paimon_test']['prefix_look_up_paimon_test' UTF-8 bytes] row:[row UTF-8 bytes] ``` When user initiates a prefix lookup with a partial key matching: ``` dt: '20250728', user_id: 'prefix_look_up_paimon_test' ``` The Flink Client calls prefixLookup(tableBucket, bucketKeyBytes), bucketKeyBytes mirrors the write path’s bucket_key structure: ``` bucketKeyBytes:[byte 1 (Paimon Insert)][offset/len for 'prefix_look_up_paimon_test']['prefix_look_up_paimon_test' UTF-8 bytes] ``` Key Difference: Write vs. Prefix Lookup | Step | Key Structure (Simplified) | Purpose |-- | -- | --| |Write | [Paimon Insert][user_id meta][order_id UTF-8][user_id UTF-8] | Full record key for storage| |Prefix Lookup | [Paimon Insert][user_id meta][user_id UTF-8] | Prefix scan for queries| These prefixes do not match—RocksDB will never find the write key during a prefix scan with the prefix lookup key. -- 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]
