Hisoka-X commented on code in PR #9002:
URL: https://github.com/apache/seatunnel/pull/9002#discussion_r2009368116


##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/config/JdbcSourceConfig.java:
##########
@@ -44,6 +45,10 @@ public class JdbcSourceConfig implements Serializable {
     private int splitInverseSamplingRate;
     private boolean decimalTypeNarrowing;
 
+    private StringSplitMode stringSplitMode;
+
+    private String collate;

Review Comment:
   ```suggestion
       private String stringSplitModeCollate;
   ```



##########
docs/en/connector-v2/source/Jdbc.md:
##########
@@ -68,6 +68,8 @@ supports query SQL and can achieve projection effect.
 | split.sample-sharding.threshold            | Int     | No       | 1000       
     | This configuration specifies the threshold of estimated shard count to 
trigger the sample sharding strategy. When the distribution factor is outside 
the bounds specified by `chunk-key.even-distribution.factor.upper-bound` and 
`chunk-key.even-distribution.factor.lower-bound`, and the estimated shard count 
(calculated as approximate row count / chunk size) exceeds this threshold, the 
sample sharding strategy will be used. This can help to handle large datasets 
more efficiently. The default value is 1000 shards.                             
                                                                                
    |
 | split.inverse-sampling.rate                | Int     | No       | 1000       
     | The inverse of the sampling rate used in the sample sharding strategy. 
For example, if this value is set to 1000, it means a 1/1000 sampling rate is 
applied during the sampling process. This option provides flexibility in 
controlling the granularity of the sampling, thus affecting the final number of 
shards. It's especially useful when dealing with very large datasets where a 
lower sampling rate is preferred. The default value is 1000.                    
                                                                                
                                                                                
        |
 | common-options                             |         | No       | -          
     | Source plugin common parameters, please refer to [Source Common 
Options](../source-common-options.md) for details.                              
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
   |
+| string_split_mode                          | String  | No       | -          
     | When set to "charset_based", enables charset-based string splitting 
algorithm. The algorithm assumes characters of partition_column are within 
ASCII range 32-126, which covers most character-based splitting scenarios.      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
     |
+| string_split_mode_collate                  | String  | No       | -          
     | Specifies the collation to use when string_split_mode is set to 
"charset_based" and the table has a special collation. If not specified, the 
database's default collation will be used.                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
       |

Review Comment:
   Oh, it dawned on me that it might be better to add the split prefix, just 
like the other sharding parameters.
   ```suggestion
   | split.string_split_mode                          | String  | No       | 
sample               | Supports different string splitting algorithms. By 
default, `sample` is used to determine the split by sampling the string value. 
You can switch to `charset_based` to enable charset-based string splitting 
algorithm. When set to `charset_based`, the algorithm assumes characters of 
partition_column are within ASCII range 32-126, which covers most 
character-based splitting scenarios.                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                               |
   | split.string_split_mode_collate                  | String  | No       | -  
             | Specifies the collation to use when string_split_mode is set to 
`charset_based` and the table has a special collation. If not specified, the 
database's default collation will be used.                                      
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
       |
   ```



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