corgy-w commented on issue #13217:
URL: https://github.com/apache/seatunnel/issues/13217#issuecomment-6772942825
Thanks for the interest! Before anyone starts implementing, I'd love to hear
the community's thoughts on a few open design questions:
1. **Model placement**: Should the new `DefaultValue` abstraction (LITERAL /
EXPRESSION) live on `Column` in seatunnel-api, or stay in the catalog layer? We
plan to keep the existing `defaultValue` field untouched for backward
compatibility.
2. **Expression normalization**: Should SeaTunnel define a small canonical
expression vocabulary (e.g. `CURRENT_TIMESTAMP`, `CURRENT_DATE`), and map
source-dialect → canonical → target-dialect? That scales as N+M instead of N×M
across dialects, but limits expressiveness.
3. **Fallback policy**: For unmappable expressions (e.g. PostgreSQL
`nextval('seq')` → MySQL), is skip + WARN acceptable by default, or should we
add a config option to control strict vs. lenient behavior?
4. **Create-table path**: Most `XxxCreateTableSqlBuilder`s do not emit
`DEFAULT` today. Should literal defaults be enabled for all JDBC dialects at
once, or opt-in per dialect?
5. **MySQL 8 gap**: `COLUMN_DEFAULT` from `information_schema` is NULL for
expression defaults. Is reading `EXTRA` / parsing `SHOW CREATE TABLE`
acceptable, or should we prefer another source?
Once the direction is agreed, I'm happy to start with the seatunnel-api
model plus MySQL/PostgreSQL mappings as a first PR.
--
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]