Repository navigation
[Docs] Fix IoTDB, Http, Paimon, SelectDB, Neo4j and Phoenix doc inaccuracies - #12758
Conversation
…uracies - IoTDB/IoTDBv2: fix inverted num_partitions fallback condition, correct the partition interval notation, and stop claiming stream support for IoTDBv2 (the source is bounded-only); align the stale javadoc in both split enumerators that documented the same inverted condition - Http: correct pageing.start_page_number type (Int -> Long) and mark schema as conditionally required when format = json - Paimon sink: remove reference to nonexistent paimon.auto-create-table option, fix zh S3 credentials property name (fs.s3a.aws.credentials.provider), and fix the zh Changelog Producer section (wrong heading, and wrong claim that changelog-producer=input is mandatory) - SelectDB Cloud sink: document sink.label-prefix and sink.flush.queue-size - JsonPath transform: fix example output to match the example input - Neo4j source: correct authentication note to match actual precedence behavior - Phoenix: mark query as conditionally required per the JDBC source contract
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks @zhangshenghang for another careful docs-accuracy pass! I went through the full diff of head afcc385a2d87 and checked each claim against the connector sources instead of trusting the PR description. Short version: every fix I traced is correct, and I only have three small, non-blocking wording suggestions.
What Problem Does This PR Solve?
- User pain point: Several connector and transform pages describe behavior that differs from the code (inverted
num_partitionscondition, an option that does not exist, wrong types/required flags, a wrong example output), so users following them get silent no-ops or wrong expectations. - Fix approach: Correct 16 doc pages (en + zh) and two comment-only Javadoc lines against the actual option definitions and logic.
- One-sentence summary: A docs batch that brings IoTDB, IoTDBv2, Http, Paimon, SelectDB Cloud, Neo4j, Phoenix and JsonPath pages in line with the code.
1. Code Change Review
1.1 Core Logic Analysis
What I verified against the head (static review; I did not run anything):
- IoTDB / IoTDBv2:
end - start < numPartitions -> numPartitions = end - startis atIoTDBSourceSplitEnumerator.java:172and the same check in the v2 enumerator, so the corrected direction is right. The predicate istime >= start and time < start + size, with the last slice ending atupper_bound + 1, so[lower_bound, upper_bound]inclusive is right.IoTDBv2Source.getBoundedness()returnsBOUNDED, so uncheckingstreamis right (the v1 page was already unchecked). - Http:
HttpSourceOptions.START_PAGE_NUMBERisOption<Long>andHttpSourcereads it withgetLong;HttpSourceFactoryhas.conditional(FORMAT, JSON, SCHEMA). - Paimon: there is no
auto-create-tableanywhere underconnector-paimon(the two remaining hits indocs/en/architecture/**are JDBCschema-evolutionexamples, unrelated). The zh Changelog section now matches the en page. - SelectDB Cloud:
sink.label-prefixandsink.flush.queue-sizeexist inSelectDBSinkOptions(defaults: random UUID,1) and are registered inSelectDBSinkFactory. - Neo4j:
Neo4jAuthenticationConditions.AUTHENTICATION_METHODrequires at least one method, andDriverBuilder.build()applies username, then bearer token, then Kerberos. - JsonPath: the new result cell is exactly what
$.data.c_map_arrayyields from the example input in the same page. - Javadoc edits are comment-only; en and zh pages are consistent with each other.
1.2 Compatibility Impact
Fully compatible (documentation plus two comments). No option, default, API or serialization change.
1.3 Performance / Side-Effect Analysis
None.
1.4 Error Handling and Logging
No change.
Issue 1 (Low, non-blocking): the IoTDB fallback sentence describes only the root-level partition path
- Location:
docs/en/connectors/source/IoTDB.md:279-280anddocs/zh/connectors/source/IoTDB.md(the matching fallback sentence in the Chinese page) - Description: The per-table (
tables_configs) branch usesMath.min(num_partitions, upper_bound - lower_bound + 1)(IoTDBSourceSplitEnumerator.java:176-177) instead of theend - startfallback, and the same page already documents that mode at line 85. A short qualifier such as "for root-level partition options" keeps the two statements from contradicting each other. - Raised by another reviewer: No
Issue 2 (Low, non-blocking): "random UUID generated for each job" is slightly stronger than the code
- Location:
docs/en/connectors/sink/SelectDB-Cloud.md:49and the zh twin - Description:
SelectDBSinkOptions.java:94-98usesdefaultValue(UUID.randomUUID().toString()), which is evaluated once when the options class is loaded, so it is per JVM / class loader rather than strictly per job. Something like "a random UUID generated when the connector is loaded" would be accurate. - Raised by another reviewer: No
Issue 3 (Low, non-blocking): the Phoenix query row points to options the page does not document
- Location:
docs/en/connectors/source/Phoenix.md:46and the zh twin - Description:
JdbcSourceFactory.optionRule()indeed requires onlyurlanddriver, so "Conditional" is right. But the page never documentstable_path/table_list, and Phoenix has no dedicated catalog class, so I could confirm the option rule but not a Phoenix run that reads viatable_path. Linking toJdbc.mdfor those options (or just saying "required unless a table path or table list is configured, see the Jdbc source options") avoids over-promising. - Raised by another reviewer: No
2. Code Quality Assessment
2.1 Coding Standards
Table columns and en/zh pairs are consistent. The Conditional cell widths are slightly off in the raw Markdown, which renders fine.
2.2 Test Coverage and Test Stability
Docs and comments only; no test changes, so no stability rating is needed.
2.3 Documentation Updates
Both docs/en and docs/zh are updated for every fix, and the two languages agree.
3. Architectural Soundness
Precise fix. No historical-version compatibility impact.
4. Issue Summary
| # | Issue | Location | Severity |
|---|---|---|---|
| 1 | IoTDB fallback wording ignores per-table partition path | IoTDB.md:279-280 (en/zh) |
Low |
| 2 | SelectDB default label prefix is per class load, not per job | SelectDB-Cloud.md:49 (en/zh) |
Low |
| 3 | Phoenix query row references undocumented table_path / table_list |
Phoenix.md:46 (en/zh) |
Low |
5. Merge Recommendation
Conclusion: Ready to merge
- Blockers - must be fixed: none.
- Recommended fixes - non-blocking: Issues 1-3, wording only; fine as a follow-up.
CI status: the apache-side Build, labeler and Notify test workflow checks are all SUCCESS on this head. The branch is 2 commits behind dev, which is metadata only here; the remaining gate is a maintainer approval.
Thanks again for keeping the docs honest!
nzw921rx
left a comment
There was a problem hiding this comment.
I think the above three issues are worth supplementing and fixing in the future🔥
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
devbranch. 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)num_partitionsfallback with an inverted condition. The code (IoTDBSourceSplitEnumerator.java:172,IoTDBv2SourceSplitEnumerator.java:154) reduces the partition count toupper_bound - lower_boundwhen the time range is smaller thannum_partitions, not the other way around. Fixed the zh option tables and the split-rule example blocks in both languages.[lower_bound, upper_bound)while the generated predicate istime >= 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.streamas supported, butIoTDBv2Source.getBoundedness()returnsBoundedness.BOUNDED. Changed the feature checkbox to unchecked (en+zh).Http source (
docs/{en,zh}/connectors/source/Http.md)pageing.start_page_numberis declaredlongType()inHttpSourceOptions.javabut documented asInt. Fixed toLong.schemais conditionally required (HttpSourceFactory.optionRule()has.conditional(FORMAT, JSON, SCHEMA)), but the option table saidNo. Marked as conditional in both languages.Paimon sink (
docs/{en,zh}/connectors/sink/Paimon.md)paimon.auto-create-table = true, an option that has never existed in the connector (verified by grep andgit log -S). Following it is a silent no-op. Removed it; table auto-creation is driven byschema_save_mode.fs.s3a.aws.credentials, missing the.providersuffix (the en doc and both docs' own examples use the correctfs.s3a.aws.credentials.provider). Fixed.更新日志, colliding with the real release-notes section) and wrongly claimedchangelog-producer=inputis mandatory. Rewritten to mirror the en doc: all four modes are supported, default isnone.SelectDB Cloud sink (
docs/{en,zh}/connectors/sink/SelectDB-Cloud.md)sink.label-prefix(default: random UUID per job) andsink.flush.queue-size(default: 1), both defined inSelectDBSinkOptions.javaand consumed by the sink.JsonPath transform (
docs/{en,zh}/transforms/jsonpath.md)c1_map_array = [{"key1": "value1", "key2": "value2"}], but the example input containsc_string_1/2/3keys 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)Neo4jAuthenticationConditionsonly requires at least one, andDriverBuilderapplies 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)querywas marked unconditionally required, but the shared JDBC source factory only requiresurlanddriver;queryis an alternative totable_path/table_list. Marked as conditional (consistent withJdbc.md, which documentsqueryas optional).Areas updated
16 documentation files under
docs/enanddocs/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 diffreviewed line by line against the corresponding code (option definitions,OptionRules, 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)../mvnw verifywas not run because this change is documentation-only; it does not affect compiled code paths beyond comments.