|
22 | 22 | import org.apache.seatunnel.api.sink.DataSaveMode;
|
23 | 23 | import org.apache.seatunnel.api.sink.SchemaSaveMode;
|
24 | 24 | import org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.dialectenum.FieldIdeEnum;
|
| 25 | +import org.apache.seatunnel.connectors.seatunnel.jdbc.source.StringSplitMode; |
25 | 26 |
|
26 |
| -import java.math.BigDecimal; |
27 | 27 | import java.util.List;
|
28 | 28 | import java.util.Map;
|
29 | 29 |
|
@@ -171,14 +171,14 @@ public interface JdbcOptions {
|
171 | 171 | .noDefaultValue()
|
172 | 172 | .withDescription("partition column");
|
173 | 173 |
|
174 |
| - Option<BigDecimal> PARTITION_UPPER_BOUND = |
| 174 | + Option<String> PARTITION_UPPER_BOUND = |
175 | 175 | Options.key("partition_upper_bound")
|
176 |
| - .bigDecimalType() |
| 176 | + .stringType() |
177 | 177 | .noDefaultValue()
|
178 | 178 | .withDescription("partition upper bound");
|
179 |
| - Option<BigDecimal> PARTITION_LOWER_BOUND = |
| 179 | + Option<String> PARTITION_LOWER_BOUND = |
180 | 180 | Options.key("partition_lower_bound")
|
181 |
| - .bigDecimalType() |
| 181 | + .stringType() |
182 | 182 | .noDefaultValue()
|
183 | 183 | .withDescription("partition lower bound");
|
184 | 184 | Option<Integer> PARTITION_NUM =
|
@@ -225,4 +225,18 @@ public interface JdbcOptions {
|
225 | 225 | .mapType()
|
226 | 226 | .noDefaultValue()
|
227 | 227 | .withDescription("additional connection configuration parameters");
|
| 228 | + |
| 229 | + Option<StringSplitMode> STRING_SPLIT_MODE = |
| 230 | + Options.key("split.string_split_mode") |
| 231 | + .enumType(StringSplitMode.class) |
| 232 | + .defaultValue(StringSplitMode.SAMPLE) |
| 233 | + .withDescription( |
| 234 | + "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."); |
| 235 | + |
| 236 | + Option<String> STRING_SPLIT_MODE_COLLATE = |
| 237 | + Options.key("split.string_split_mode_collate") |
| 238 | + .stringType() |
| 239 | + .noDefaultValue() |
| 240 | + .withDescription( |
| 241 | + "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."); |
228 | 242 | }
|
0 commit comments