zhangshenghang opened a new pull request, #12758:
URL: https://github.com/apache/seatunnel/pull/12758
## Purpose of this PR
This PR fixes a batch of real documentation writing issues found by
comparing the docs against the actual connector/transform source code on the
current `dev` branch. Every fix below was verified against the code before
editing.
## Issues found and changes
**IoTDB / IoTDBv2 (`docs/{en,zh}/connectors/source/IoTDB.md`, `IoTDBv2.md`)**
- Both docs described the `num_partitions` fallback with an inverted
condition. The code (`IoTDBSourceSplitEnumerator.java:172`,
`IoTDBv2SourceSplitEnumerator.java:154`) reduces the partition count to
`upper_bound - lower_bound` when the time range is *smaller* than
`num_partitions`, not the other way around. Fixed the zh option tables and the
split-rule example blocks in both languages.
- The partition interval was written as `[lower_bound, upper_bound)` while
the generated predicate is `time >= lower_bound and time < upper_bound + 1`,
i.e. both bounds are inclusive. Fixed to `[lower_bound, upper_bound]` (en+zh),
consistent with the examples in the same section.
- IoTDBv2 docs marked `stream` as supported, but
`IoTDBv2Source.getBoundedness()` returns `Boundedness.BOUNDED`. Changed the
feature checkbox to unchecked (en+zh).
- Also corrected the same inverted condition in the javadoc of both split
enumerators, which is where the doc text originally came from (comment-only
change, no behavior change).
**Http source (`docs/{en,zh}/connectors/source/Http.md`)**
- `pageing.start_page_number` is declared `longType()` in
`HttpSourceOptions.java` but documented as `Int`. Fixed to `Long`.
- `schema` is conditionally required (`HttpSourceFactory.optionRule()` has
`.conditional(FORMAT, JSON, SCHEMA)`), but the option table said `No`. Marked
as conditional in both languages.
**Paimon sink (`docs/{en,zh}/connectors/sink/Paimon.md`)**
- The FAQ told users to set `paimon.auto-create-table = true`, an option
that has never existed in the connector (verified by grep and `git log -S`).
Following it is a silent no-op. Removed it; table auto-creation is driven by
`schema_save_mode`.
- zh doc referenced the S3 property `fs.s3a.aws.credentials`, missing the
`.provider` suffix (the en doc and both docs' own examples use the correct
`fs.s3a.aws.credentials.provider`). Fixed.
- The zh "Changelog Producer" section had a wrong heading (`更新日志`, colliding
with the real release-notes section) and wrongly claimed
`changelog-producer=input` is mandatory. Rewritten to mirror the en doc: all
four modes are supported, default is `none`.
**SelectDB Cloud sink (`docs/{en,zh}/connectors/sink/SelectDB-Cloud.md`)**
- Added the missing option rows `sink.label-prefix` (default: random UUID
per job) and `sink.flush.queue-size` (default: 1), both defined in
`SelectDBSinkOptions.java` and consumed by the sink.
**JsonPath transform (`docs/{en,zh}/transforms/jsonpath.md`)**
- The example result table showed `c1_map_array = [{"key1": "value1",
"key2": "value2"}]`, but the example input contains `c_string_1/2/3` keys and
two map entries. Fixed the output to match what the transform actually produces
from the given input.
**Neo4j source (`docs/{en,zh}/connectors/source/Neo4j.md`)**
- The note said "use exactly one authentication method", but
`Neo4jAuthenticationConditions` only requires at least one, and `DriverBuilder`
applies a precedence (username/password > bearer token > Kerberos) when several
are set. Aligned the note with the sink doc, which documents the actual
behavior.
**Phoenix (`docs/{en,zh}/connectors/source/Phoenix.md`)**
- `query` was marked unconditionally required, but the shared JDBC source
factory only requires `url` and `driver`; `query` is an alternative to
`table_path`/`table_list`. Marked as conditional (consistent with `Jdbc.md`,
which documents `query` as optional).
## Areas updated
16 documentation files under `docs/en` and `docs/zh` (connectors: IoTDB,
IoTDBv2, Http, Paimon, SelectDB-Cloud, Neo4j, Phoenix; transforms: jsonpath)
plus 2 comment-only javadoc fixes in the IoTDB/IoTDBv2 split enumerators. 18
files changed, 29 insertions, 25 deletions.
## English and Chinese docs
Yes — every fix was applied to both the English and Chinese versions of the
same page so the two languages stay in sync. Several of the issues
(num_partitions condition, Paimon FAQ, Paimon Changelog Producer section, Http
rows) existed in both languages.
## Duplicate check
Before submitting I listed all PRs created in the last 7 days: #12730,
#12709, #12693, #12679 (my previous docs batches), #12675 (MQTT), #12663. I
reviewed the file lists of each via `gh pr diff --name-only`. This PR only
touches pages and issues not covered by any of them (IoTDB/IoTDBv2, Http,
Paimon sink, SelectDB-Cloud, Neo4j source, Phoenix, jsonpath); none of the
fixed issues overlap with those PRs.
## Verification
- `git diff` reviewed line by line against the corresponding code (option
definitions, `OptionRule`s, split-enumerator logic).
- `./mvnw -q spotless:apply -pl
seatunnel-connectors-v2/connector-iotdb,seatunnel-connectors-v2/connector-iotdb-v2`
— passes with no further changes (covers the two javadoc edits).
- Markdown table integrity check (consistent column counts) on all modified
tables — passes.
- Relative-link resolution check on all 16 modified markdown files — all
links resolve.
- Full `./mvnw verify` was not run because this change is
documentation-only; it does not affect compiled code paths beyond comments.
--
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]