dybyte opened a new pull request, #9642:
URL: https://github.com/apache/seatunnel/pull/9642

   
   ### Purpose of this pull request
   
   This PR enables customizing the key field name when reading Redis hash data 
types. By default, the key is read and stored under "hash_key", but now users 
can specify a custom field name via key_field_name.
   
   ### Question
   
   I have a question about the consistency of the current behavior regarding 
key_field_name and read_key_enabled when reading Redis data.
   
   For the hash data type, the key is always read by default — even without 
setting read_key_enabled = true. The key is included as a field named 
"hash_key".
   However, for other Redis data types, the key is not read unless 
read_key_enabled is explicitly set to true.
   
   In this PR, I made it possible to customize the key field name using 
key_field_name when reading the hash type — even without setting 
read_key_enabled.
   But I’m concerned this might introduce inconsistency, since the behavior for 
other types still depends on the read_key_enabled flag.
   
   Should we:
   
   1. Align all types to require read_key_enabled = true before reading the 
key, or
   
   2. Keep the current behavior as-is, where hash types always read the key by 
default?
   
   I'd appreciate your thoughts on whether this default behavior should be 
unified or if it's acceptable for hash types to remain an exception.
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   This PR allows users to specify the name of the field that stores the Redis 
key when reading hash data types via the key_field_name option.
   
   ### How was this patch tested?
   
   A test was added that reads the key from Redis hash data using a custom 
field name and verifies that the key is correctly utilized on the sink side.
   
   ### Check list
   
   * [ ] If any new Jar binary package adding in your PR, please add License 
Notice according
     [New License 
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [x] If necessary, please update the documentation to describe the new 
feature. https://github.com/apache/seatunnel/tree/dev/docs
   * [ ] If you are contributing the connector code, please check that the 
following files are updated:
     1. Update 
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties)
 and add new connector information in it
     2. Update the pom file of 
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
     3. Add ci label in 
[label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
     4. Add e2e testcase in 
[seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
     5. Update connector 
[plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)


-- 
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]

Reply via email to