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

   ## Purpose of this PR
   
   This PR fixes a batch of verified documentation issues found by 
cross-checking connector docs against the actual Java source code (Options, 
OptionRule, type converters, placeholder definitions), and restores en/zh doc 
parity where the two languages had diverged.
   
   ## What issues were found
   
   **Doc vs code mismatches (verified against source):**
   - `partition_num` default documented as "job parallelism" but the effective 
default in `JdbcSourceTableConfig` (`DEFAULT_PARTITION_NUMBER = 10`) is **10**: 
Mysql, PostgreSQL, SqlServer, OceanBase, Redshift, Vertica (en+zh, table cells 
+ prose sections).
   - **DuckDB** type mapping tables contradicted `DuckDBTypeConverter` and its 
unit tests: unsigned ints (`UTINYINT→TINYINT`, `USMALLINT→SMALLINT`, 
`UINTEGER→INT`, `UBIGINT→BIGINT` — not the shifted mapping the doc claimed), 
`DECIMAL>38` truncates precision/scale to 38 (not `DECIMAL(38,18)`), 
`ARRAY/STRUCT/MAP→STRING` (not BYTES) on read, and on write `TINYINT/SMALLINT` 
are not widened to `INTEGER` while `ARRAY/ROW/MAP` throw a conversion error 
instead of mapping to BLOB (source+sink, en+zh).
   - **Datahub sink** documented a nonexistent `${table}` placeholder and 
claimed `${table_name}` (the real framework placeholder per 
`TablePlaceholder.java`) was deprecated — the doc had the relationship inverted 
and the example config would fail at runtime (en+zh).
   - **Vertica**: source doc mapped `INT UNSIGNED/BIGINT` to `LONG` (SeaTunnel 
type is `BIGINT`, cf. `VerticaTypeMapper`); 
`partition_lower_bound`/`partition_upper_bound` documented as `BigDecimal` but 
declared `stringType` in `JdbcSourceOptions`; sink Description claimed XA 
exactly-once support, contradicting the doc's own Key Features note and the 
Vertica dialect (en+zh).
   - **DB2** source: `BIGINT→LONG` and `DECIMAL→DECIMAL(38,18)` did not match 
`DB2TypeConverter` (en+zh).
   - **OceanBase** source: MySQL-mode table mapped `TINYINT` to both BYTE and 
SMALLINT (duplicate/contradictory row); Oracle-mode `Number(p), p>18` maps to 
`DECIMAL(min(p,38), 0)` per `OracleTypeConverter`, not `DECIMAL(38,18)` (en+zh).
   - **PostgreSQL** source: `driver` row said "if you use MySQL the value is 
`com.mysql.cj.jdbc.Driver`" — copy-paste from the MySQL doc (en+zh).
   - **OneSignal**: `format` default documented as `json` but code default is 
`TEXT` (`HttpSourceOptions`); pagination example used `page_step`, an option 
that does not exist anywhere in connector-http (en+zh).
   - **Assert** sink: type column said `comment` for `...\_comment` (not a type 
— it's a string) and `field_type` omitted the ConfigMap variant that the doc's 
own section and `AssertRuleParser` accept (en+zh).
   - **RocketMQ / Pulsar FAQ** listed incomplete startup-mode sets vs the code 
enums and option rules (en+zh).
   - **GraphQL / Airtable** sinks/sources missing rows for options present in 
the factory OptionRule (`multi_table_sink_replica` default 1, 
retry/backoff/poll options) (en+zh).
   - **Elasticsearch** sink en doc: `auth_type` summary cell omitted 
`api_key_encoded` (supported by the enum and documented further down the same 
page); removed a duplicated `### Schema Evolution` heading (en).
   - **Greenplum** sink: en doc lacked the Data Type Mapping section that zh 
has; zh table mapped `MONEY→DECIMAL(p,s)` but `PostgresTypeConverter` maps 
MONEY to `DECIMAL(30,2)`.
   
   **en/zh parity:**
   - zh InfluxDB source was missing the `where` option section and the "Bounded 
Read With Parallel Splits" example; zh InfluxDB sink was missing the "Per-Table 
Measurement With Replicated Writers" example — both ported/translated from the 
en docs.
   - zh ObsFile source had a duplicated `sheet_name` row in the option table — 
removed.
   
   ## What was changed
   
   42 documentation files (21 en + 21 zh), +225/−87 lines, all real content 
fixes (option tables, type mappings, examples, FAQ answers); no reformatting or 
whitespace-only churn.
   
   ## Are the English and Chinese docs both checked?
   
   Yes. Every fix was applied to both `docs/en` and `docs/zh` where the same 
content exists in both languages, and the zh-only gaps (InfluxDB examples, 
ObsFile duplicate row) were fixed for parity.
   
   ## Duplicate check (last 7 days)
   
   Checked PRs created since 2026-09-30 via GitHub search (docs-related): 
#12675 (Mqtt), #12663, #12641 (Zeta engine), #12621 
(Http-Linear/FakeSource/SNMP/common-options), #12615 
(Ftp/Hdfs/Hive/Jdbc-sink/Paimon/StarRocks/CDC), #12609 
(transforms/configuration), #12602 (formats/Clickhouse/Doris/Kafka), #12570 
(Paimon/Redis), #12611 (RAG). None of the files or issues fixed here overlap 
with those PRs; this PR targets connectors and pages they did not touch.
   
   ## How the change was verified
   
   - For every doc claim, compared against the code: `JdbcSourceTableConfig`, 
`DuckDBTypeConverter` (+ its unit tests), `VerticaTypeMapper`, 
`DB2TypeConverter`, `OracleTypeConverter`, `PostgresTypeConverter`, 
`TablePlaceholder`, `HttpSourceOptions`/`HttpSourceReader` (pagination keys), 
`RocketMqSourceOptions`, `PulsarSourceOptions`, `AssertConfig`, 
`AirtableSourceFactory`/`AirtableSinkFactory`, `SinkConnectorCommonOptions`, 
`ElasticsearchBaseOptions`.
   - Ran a local Markdown consistency check over all 42 changed files: table 
column-count consistency (with escaped-pipe handling) and relative-link target 
resolution — all pass.
   - Full CI (dead-link job) requires network and is `continue-on-error` 
upstream; no links were added or removed by this change, so it was not run 
locally.


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