yzeng1618 commented on issue #11969:
URL: https://github.com/apache/seatunnel/issues/11969#issuecomment-5422035881

   Thanks for the report. This is not a Doris sink issue — the sink does render 
column/table comments when the upstream catalog table carries them (the default 
`save_mode_create_template` already contains `COMMENT '${comment}'`).
   
   The root cause is on the JDBC source side: when only `query` is configured, 
the schema is derived from JDBC `ResultSetMetaData`, which carries no comment 
information, so comments are lost before reaching the sink. Comments are only 
read from `INFORMATION_SCHEMA` when `table_path` is used.
   
   **Workarounds:**
   
   1. Use `table_path = "xxxx.report"` instead of `query` (recommended); or
   2. Keep `query` and add `table_path` — comments/PK/constraints will be 
merged from the physical table; or
   3. Pre-create the Doris table manually with comments — the default 
`schema_save_mode = CREATE_SCHEMA_WHEN_NOT_EXIST` leaves existing tables 
untouched.
   
   Note: the table already auto-created without comments must be dropped first, 
otherwise it won't be recreated.
   
   I'm looking into an improvement so that query-only mode auto-detects the 
underlying table and preserves comments/constraints automatically.
   


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