zhangshenghang opened a new pull request, #12951:
URL: https://github.com/apache/seatunnel/pull/12951
## Acknowledgment
I acknowledge that I am contributing to Apache SeaTunnel and I am happy to
contribute to this project.
## What documentation issues were found
While auditing connector documentation against the actual source code
(Option definitions, OptionRule constraints, and type converters), I found the
following real inaccuracies:
1. **DuckDB source & sink — stale data type mapping tables (4 files)**: The
tables were copied from another dialect and contradicted `DuckDBTypeConverter`:
- Source: `UTINYINT` was documented as `SMALLINT` (actually `TINYINT`),
`USMALLINT` as `INT` (actually `SMALLINT`), `UINTEGER` as `BIGINT` (actually
`INT`), `UBIGINT` as `DECIMAL(20,0)` (actually `BIGINT`), `TIMESTAMP WITH TIME
ZONE` as `TIMESTAMP` (actually `TIMESTAMP_TZ`), `ARRAY/STRUCT/MAP` as `BYTES`
(actually `STRING`); `UHUGEINT`/`BIGNUM` were missing from the `DECIMAL(38,0)`
row; oversized `DECIMAL` was documented as `DECIMAL(38,18)` while the code
preserves the original scale (`DECIMAL(38,y)`).
- Sink: `TINYINT`/`SMALLINT` were documented as mapping to `INTEGER`
(actually each keeps its own type), oversized `DECIMAL` as `DECIMAL(38,18)`
(actually `DECIMAL(38,y)`), and `ARRAY/ROW/MAP` as `BLOB` although the
converter rejects them; `TIMESTAMP_TZ → TIMESTAMP WITH TIME ZONE` was missing.
2. **DuckDB source — `query` marked as required**: only `url` and `driver`
are required in `JdbcSourceFactory`; `query` is optional
(`table_path`/`table_list` are alternatives). The doc itself even showed
examples without `query`.
3. **Kingbase source & sink — wrong `SMALLSERIAL` mapping (4 files)**:
`SMALLSERIAL` maps to `SMALLINT` (via `PostgresTypeConverter`, inherited by
`KingbaseTypeConverter`), not `INT` together with `SERIAL`/`INT4`.
4. **Kingbase source & sink — non-canonical SeaTunnel type names**:
`LOCALDATETIME`/`LOCALTIME`/`LOCALDATE` corrected to `TIMESTAMP`/`TIME`/`DATE`,
matching `PostgreSQL.md` and the actual `LocalTimeType` mappings.
5. **SmbFile source — three supported options missing from the option table
(2 files)**: `excel_use_header_line`, `markdown_rag_metadata_enabled` and
`pdf_rag_metadata_enabled` are defined in `FileBaseSourceOptions` and part of
the SmbFile source option rule, but were undocumented.
6. **RabbitMQ sink — misleading `rabbitmq.config` claims (2 files)**: the
FAQ and two examples recommended tuning connection resilience via
`rabbitmq.config`, but the sink parses this option without ever applying it to
the RabbitMQ client (`sinkOptionProps` has no consumers; `RabbitmqClient` only
applies the dedicated typed options). Examples were cleaned up and the
FAQ/option description now point to the real options.
7. **Hudi sink — `index_type` section header said `[string]`** while the
option is an enum (`HoodieIndex.IndexType`) and the doc's own table says `enum`
(2 files).
8. **HBase source — wrong wording and feature label (2 files)**: `batch` was
described as limiting "columns" per scan; the code (and the doc's own table)
says "cells". The feature list said "schema projection" while the connector
implements `SupportColumnProjection` ("column projection").
9. **FakeSource — `double.fake.mode` description said "generating float
data"** (copy-paste from the `float` row; the code says double) (1 file).
10. **Chinese/English parity gaps**: zh Opengauss-CDC was missing step 3 of
the "使用步骤" section; zh Aerospike sink was missing the whole "Stream CDC Records
Into Aerospike With kv Format" example; zh ClickhouseFile had the `timer flush`
feature checkbox orphaned outside the feature list.
## What was changed
All of the above were corrected so the documentation matches the code: type
mapping tables rewritten per `DuckDBTypeConverter` / `PostgresTypeConverter`,
required flags fixed, missing options documented with the code's own
descriptions, misleading RabbitMQ guidance replaced with the options the sink
actually applies, and the missing/misplaced zh content added.
## Which areas/files were updated
20 files (10 en + 10 zh):
`docs/{en,zh}/connectors/source/{DuckDB,Kingbase,SmbFile,Hbase,FakeSource,Opengauss-CDC}.md`,
`docs/{en,zh}/connectors/sink/{DuckDB,Kingbase,Hudi,Rabbitmq}.md`, plus
`docs/zh/connectors/sink/{Aerospike,ClickhouseFile}.md`.
## Were both English and Chinese docs checked?
Yes. Every English fix was mirrored into the corresponding Chinese page, and
three Chinese-only gaps (Opengauss-CDC step 3, Aerospike CDC example,
ClickhouseFile layout) were fixed by aligning with the English pages.
## How duplicate PRs from the last 7 days were checked
I listed all my open/merged PRs of the last 7 days (#12941, #12932, #12911,
#12865, #12813, #12771, #12730) and collected every file they touch. The files
and issues fixed here (DuckDB, Kingbase, SmbFile, Hbase, FakeSource,
Opengauss-CDC, Rabbitmq, Hudi, Aerospike, ClickhouseFile) do not overlap with
any of them. I also searched open documentation-labeled PRs from other authors
and found no PR covering these connectors.
## How the change was verified
- Every corrected value was verified against the source code before editing
(e.g. `DuckDBTypeConverter`, `PostgresTypeConverter`/`KingbaseTypeConverter`,
`JdbcSourceFactory` option rule, `FileBaseSourceOptions` +
`SmbFileSourceFactory`, `RabbitmqConfig`/`RabbitmqClient`, `FakeSourceOptions`,
`HudiSinkOptions`, `HbaseSourceOptions`).
- Ran a markdown table integrity check over all 20 changed files (header/row
column consistency): OK.
- Ran a relative-link existence check over all changed files: OK.
- A full site build was not run because the Docusaurus site lives in the
separate apache/seatunnel-site repository; no in-repo docs build exists.
--
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]