Hisoka-X commented on code in PR #9642:
URL: https://github.com/apache/seatunnel/pull/9642#discussion_r2250273802
##########
docs/en/connector-v2/source/Redis.md:
##########
@@ -142,11 +142,26 @@ schema {
### key_field_name [string]
-Specifies the field name to store the Redis key in the output record when
`read_key_enabled = true`.
+Specifies the field name to store the Redis key in the output record when
`read_key_enabled = true` or `data_type = hash`.
-If not set, the default field name `key` will be used.
+- When read_key_enabled = true, this option must be set explicitly.
-This field is useful when the default `key` field name conflicts with existing
schema fields, or if a more descriptive name is preferred.
+- When data_type = hash and this option is not set, the default field name
will be hash_key.
Review Comment:
```suggestion
- When data_type = hash and this option is not set, the default field name
will be `hash_key`.
```
##########
seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/config/RedisSourceOptions.java:
##########
@@ -51,6 +51,6 @@ public enum HashKeyParseMode {
public static final Option<String> KEY_FIELD_NAME =
Options.key("key_field_name")
.stringType()
- .defaultValue("key")
- .withDescription("The value of key you want to write to
redis.");
+ .noDefaultValue()
Review Comment:
I think we can keep default value to `key`. Only set default value to
`hash_key` when datatype is hash.
--
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]