zhangshenghang opened a new pull request, #12771:
URL: https://github.com/apache/seatunnel/pull/12771
## Purpose of this PR
This PR fixes a batch of real documentation issues found by comparing the
docs against the actual connector source code on `dev`. All findings were
verified against the code before editing, and every issue is fixed in both the
English and Chinese docs.
## What was changed
**PostgreSQL-CDC (en/zh)**
- All three task examples used a non-existent option `schema-names`; the
connector only defines `schema-name` (`PostgresIncrementalSourceOptions.java`).
Because of the wrong key, schema filtering silently did not apply. Fixed the
examples and added the missing `schema-name` row to the options table.
- `server-time-zone` default was documented as `UTC`, but the code default
is `ZoneId.systemDefault().getId()` (`JdbcSourceOptions.java`); changed to `-`,
consistent with the MySQL-CDC/Oracle-CDC pages (the row description already
explained the real behavior).
- `connect.timeout.ms` type was documented as `Duration`, but the code
declares `longType()`; changed to `Long`.
**MongoDB-CDC (en/zh)**
- Added the missing `format` option row (`DEFAULT` /
`COMPATIBLE_DEBEZIUM_JSON`, defined in the CDC base `SourceOptions` and applied
by `MongodbIncrementalSource`), mirroring the MySQL-CDC page.
- `debezium` default was documented as `-`, but the MongoDB option overrides
the base option with the default map `{key.converter.schemas.enable=false,
value.converter.schemas.enable=false}` (`MongodbIncrementalSourceOptions.java`).
**InfluxDB source (en/zh)**
- The `partition_num` split description was inverted: the code clamps the
partition count down to `upper_bound - lower_bound` when `partition_num` is
**greater** than the range (`InfluxDBSourceSplitEnumerator.genSplitNumRange`),
not when it is less.
**InfluxDB sink (en/zh)**
- `key_time` claimed ISO-8601 timestamp strings are accepted, but the
serializer only does `Long.parseLong` for STRING fields
(`DefaultSerializer.createTimestampExtractor`); an ISO-8601 string would throw
`NumberFormatException`. Rewrote the description (BIGINT epoch millis / numeric
STRING / TIMESTAMP with UTC conversion) and clarified the STRING row of the
type-mapping table.
**Oracle-CDC (en)**
- The heading "Oracle 11g is not supported" (above the `GRANT LOGMINING`
statement) read as if Oracle CDC does not support Oracle 11g, contradicting the
FAQ on the same page. Reworded to "The following privilege is not supported on
Oracle 11g", matching the Chinese page.
**S3File (en/zh)**
- Source: `parse_partition_from_path` example said the path `.../age=26`
adds `age=16`; fixed to `age=26`.
- Sink: added the missing `multi_table_sink_replica` row (present in
`S3FileSinkFactory.optionRule()` and documented on other file-sink pages).
**S3File (zh only, en was already correct)**
- `field_delimiter` said it is only used for `text`, but the code applies it
to `text` and `csv` (`BaseFileSinkConfig`); fixed in the table and the section
description.
- `merge_update_event` description was truncated mid-sentence; completed it
to explain the UPDATE_BEFORE/UPDATE_AFTER merging behavior.
- The "Simple" example had broken HOCON: the `source {` block was closed by
a stray nested `source { }` instead of `}`, so `transform`/`sink` ended up
nested inside `source`. Fixed to match the English page.
**GcsFile source (en/zh)**
- Added options that exist in `GcsFileSourceFactory.optionRule()` / the
shared reader but were undocumented (all are documented on the S3 page):
`date_format`, `datetime_format`, `time_format`, `csv_use_header_line`,
`file_filter_modified_start`, `file_filter_modified_end`,
`sort_files_by_modification_time`, `metalake_type`.
**Socket sink (en only, zh was already correct)**
- Example said input `age: 12` produces `{"name":"jared","age":17}`; fixed
the input to `age: 17`.
**SftpFile sink (zh only)**
- The `:::tip` admonition block was never closed, so the rest of the page
(key features onward) fell inside the tip container; added the closing `:::` to
match the English page.
**Feishu sink (zh only)**
- The rich-text example used `named_struct(...)`, a function that does not
exist in SeaTunnel SQL (the correct `MAP(...)` is used on the English page);
the ZH example would fail at runtime.
## Which areas / files were updated
18 documentation files (`docs/en` + `docs/zh`), all under
`docs/*/connectors/`:
- `source/PostgreSQL-CDC.md`, `source/MongoDB-CDC.md`,
`source/Oracle-CDC.md`, `source/InfluxDB.md`, `source/S3File.md`,
`source/GcsFile.md`
- `sink/InfluxDB.md`, `sink/S3File.md`, `sink/Socket.md`, `sink/Feishu.md`,
`sink/SftpFile.md` (and their `docs/zh` counterparts)
No code was changed in this PR.
## Were both English and Chinese docs checked?
Yes. Every issue above was fixed in both languages where applicable; for
issues that existed only in one language (SftpFile tip block, Feishu
`named_struct`, ZH S3File table/示例, EN Socket example, EN Oracle-CDC heading),
the other language was verified as already correct.
## How duplicate PRs were checked
I reviewed all SeaTunnel PRs opened in the last 7 days (by any author),
including the docs batches #12758, #12730, #12709, #12693 and #12679, plus
#12663 and #12703. I programmatically compared the union of the files touched
by those PRs with the 18 files changed here: **zero file overlap**. This PR
therefore does not repeat any recent fix; the connectors above (PostgreSQL-CDC,
MongoDB-CDC, Oracle-CDC, InfluxDB, S3File, GcsFile, Socket, SftpFile, Feishu)
were not covered by them.
## How the change was verified
- For every fix, the doc statement was compared against the actual Java
source (option definitions, `OptionRule`s, split-enumeration and serializer
code paths), referenced above by class names.
- A Markdown table consistency check was run over all 18 modified files: 0
column-count issues.
- A relative-link check was run over all 18 modified files: 0 broken links.
- Confirmed no leftover occurrences of the wrong keys (`schema-names`,
`named_struct`).
- Full `mvnw verify` / site build was not run because this PR contains
documentation-only changes; no Java code, configuration, or build files were
touched.
--
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]