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

   ## Description
   
   The Pulsar Source option contract and factory OptionRule claim that `format 
= text` is supported, but the runtime validation and deserialization path 
reject it:
   
   1. `PulsarSourceFactory` OptionRule binds `field_delimiter` when `format = 
text`
   2. `PulsarBaseOptions.FORMAT` description says "Optional text and avro 
format"
   3. Pulsar Sink already supports text format via `TextSerializationSchema`
   4. The `seatunnel-format-text` dependency is already present in 
`connector-pulsar`
   
   However, `PulsarMultiTableConfig.validateFormat()` only allows JSON, 
CANAL_JSON and AVRO, and `PulsarSource.createDeserialization()` has no TEXT 
branch.
   
   ### Changes
   
   1. **PulsarMultiTableConfig.java** — Allow `TEXT` in `validateFormat()` so 
that `format = text` passes configuration validation.
   
   2. **PulsarSource.java** — Add a `TEXT` case in `createDeserialization()` 
that returns a `TextDeserializationSchema` configured with the user-specified 
`field_delimiter`. The `schemaConfig` (ReadonlyConfig) is now passed through to 
`createDeserialization()` so it can read `FIELD_DELIMITER`.
   
   ### Verification
   
   After this fix, a Pulsar Source with `format = text` and `field_delimiter = 
","` will:
   - Pass configuration validation
   - Use `TextDeserializationSchema` to deserialize text-format messages
   - Work with the existing `seatunnel-format-text` dependency
   
   Fixes #11620
   


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