Repository navigation
[Docs] Fix file, Hive, Iceberg, MongoDB and DataHub doc issues verified against source code - #13089
Conversation
…ed against source code
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks for another careful docs-accuracy pass. I reviewed the full diff (21 files, EN and ZH) at head 0ff2926cc1322f71d628c553568afc0507e25f59 and re-checked each claim against the code. Most of the corrections are right and valuable; two statements in the new Iceberg table_list table do not match the code, so they should be fixed before this lands.
What Problem Does This PR Solve?
Pain point: several connector pages describe options, enum values and placeholders that the code does not accept (MULTIPLEXING, DataHub ${table}, STRING -> ObjectId, Hive table_list inheritance), and omit options that do exist.
Fix approach: documentation-only edits, mirrored in EN and ZH, each backed by a code reference.
One-sentence summary: align file, Hive, Iceberg, MongoDB, DataHub and common-option docs with what the source really does.
1. Code Change Review
1.1 Core Logic Analysis (what I verified against source)
Confirmed correct:
dag-parsing.mode:ParsingModehasSINGLENESS,SHARDINGand deprecatedMULTIPLEX(ParsingMode.java); the new description ofMULTIPLEXmatches its Javadoc.- DataHub:
DataHubSinkFactory.optionRule()registersMULTI_TABLE_SINK_REPLICA;TablePlaceholderdefinesdatabase_name,schema_name,table_nameand others, and notablekey, so${table}is not substituted. - LocalFile/HdfsFile sink: both factories register
DATE_FORMAT_LEGACY,DATETIME_FORMAT_LEGACY,TIME_FORMAT_LEGACY(keysdate_format,datetime_format,time_format;FormatOptions.java), consumed by the Text, Csv, Excel and Xml writers. LocalFile registersMULTI_TABLE_SINK_REPLICA. The reworded HdfsFile sinkfield_delimiter/row_delimiterdescriptions match the writers (TextWriteStrategyandCsvWriteStrategyread the field delimiter; the text, csv and json writers read the row delimiter). - HdfsFile/LocalFile source:
null_formatis used byTextReadStrategyandCsvReadStrategy;skip_header_row_numberis honoured byExcelReadStrategy;excel_use_header_line,markdown_rag_metadata_enabled,pdf_rag_metadata_enabledexist inFileBaseSourceOptionsand the source factories. - Hive source:
MultipleTableHiveSourceConfigbuilds eachtable_listitem withReadonlyConfig::fromMap(no root inheritance); regex discovery throws ifmetastore_uriis blank;null_formatandparse_partition_from_pathare read inHiveSourceConfig. Hive sink:HiveTableTemplateUtilsreplaces${current_timestamp}. - MongoDB sink:
RowDataToBsonConvertersSTRING case only returnsBsonString(or the value inside a_valuewrapper); noObjectIdpath exists. - ZH pages mirror the EN edits, including the Hive sink
${current_timestamp}and the yes/no column normalisation in the Chinese tables.
1.2 Compatibility Impact
Fully compatible. Documentation only; no code, option or default changes.
1.3 Performance / Side Effects
None.
1.4 Accuracy Issues Found
Issue 1 (Medium): the Iceberg table_list item key namespace is documented as supported, but the code ignores it.
- Location:
docs/en/connectors/source/Iceberg.md:149anddocs/zh/connectors/source/Iceberg.md:162(new item-key table); code:IcebergSourceConfig.java:70. - Problem: when
table_listis used, the constructor does.map(tableConfig -> tableConfig.setNamespace(this.getNamespace())), overwriting every item'snamespacewith the rootnamespaceoption (defaultdefault). A per-itemnamespacetherefore has no effect. The only per-item way to target another database is a qualifiedtable(SourceTableConfig.getTablePath()splitsdb.table). - Risk: users set
namespaceinside an item and silently read the wrong database/table, which is exactly the class of doc defect this PR is fixing. - Best improvement: drop the
namespacerow from the item table, or describe it as "ignored; the rootnamespaceis used, usedb.tableintableto override". - Raised by another reviewer: no.
Issue 2 (Medium): wrong default for the per-item streamScanStrategy.
- Location:
docs/en/connectors/source/Iceberg.md:157anddocs/zh/connectors/source/Iceberg.md:170. - Problem: the table says
TABLE_SCAN_THEN_INCREMENTALis the default.SourceTableConfig.streamScanStrategyis initialised fromKEY_STREAM_SCAN_STRATEGY.defaultValue()(SourceTableConfig.java:51), and that option's default isFROM_LATEST_SNAPSHOT(IcebergSourceOptions.java:62-65); items are deserialised by Jackson through the public no-arg constructor (ConfigUtil.convertValue), so the initializer applies. The rootstream_scan_strategyrow in the same file already documentsFROM_LATEST_SNAPSHOT. This is my reading of the source; I did not run a job. - Risk: a streaming user who relies on the documented default expects a full table scan first, but gets incremental-from-latest, so historical rows are skipped.
- Best improvement: change the default to
FROM_LATEST_SNAPSHOTin both languages. - Raised by another reviewer: no.
Issue 3 (Low, non-blocking): "Supported formats" lists only a subset of the accepted values.
- Location:
docs/en/connectors/sink/LocalFile.md:62-64,docs/en/connectors/sink/HdfsFile.md:63-65(and ZH). - Problem:
DateUtils.Formatteralso acceptsyyyy/M/d, andDateTimeUtils.Formatteraccepts about a dozen values (for example theT-separated ISO8601 forms and.SSSSSS). The text reads as an exhaustive list. - Best improvement: say "for example" or list all values.
- Raised by another reviewer: no.
Issue 4 (Low, non-blocking): "root-level options outside table_list are ignored" is broader than the code.
- Location:
docs/en/connectors/source/Hive.md:45(and ZH). - Problem: the connector options are indeed not inherited, but framework-level source options such as
plugin_outputandparallelismat the root are still honoured by the engine. - Best improvement: scope the sentence to connector options.
- Raised by another reviewer: no.
2. Code Quality
2.1 Standards
Tables are well-formed and EN/ZH are consistent. No code changed, so no comment or logging concerns.
2.2 Tests
Not applicable (docs only). The fork run for this head passed Dead links, Build website, code style and license header.
2.3 Documentation
See Issues 1 to 4. EN/ZH parity is otherwise complete.
3. Architectural Soundness
3.1 Fix Type
Precise corrections of incorrect statements; no workarounds.
3.2 Maintainability
Adding the previously undocumented options reduces future drift. A small suggestion: because this PR verifies docs against source, a final grep of each new default in its option class (as in Issue 2) is the cheapest guard.
4. Issue Summary
| ID | Issue | Location | Severity |
|---|---|---|---|
| 1 | Item namespace documented but overwritten by root namespace |
source/Iceberg.md:149 (EN), :162 (ZH); IcebergSourceConfig.java:70 | Medium |
| 2 | Wrong per-item streamScanStrategy default |
source/Iceberg.md:157 (EN), :170 (ZH); SourceTableConfig.java:51 | Medium |
| 3 | Date/time format lists incomplete | sink/LocalFile.md, sink/HdfsFile.md | Low |
| 4 | "Root options ignored" too absolute | source/Hive.md:45 | Low |
5. Merge Recommendation
Conclusion: Ready to merge after fixes
Blockers (documentation contract):
- Issue 1: remove or correct the item
namespacerow (EN and ZH). - Issue 2: correct the
streamScanStrategydefault (EN and ZH).
Recommended non-blocking fixes: Issues 3 and 4.
CI: the fork run for this head is green (Dead links, Build website, code style, license header, sanity check); nothing here needs a rerun. The branch is up to date with dev.
…d Hive root options - Iceberg.md (EN/ZH): the per-item namespace key is overwritten by the root namespace in IcebergSourceConfig, so document it as ignored and point users at qualified db.table values; correct the per-item streamScanStrategy default to FROM_LATEST_SNAPSHOT. - LocalFile.md / HdfsFile.md (EN/ZH): present the date/datetime/time format lists as examples instead of exhaustive lists. - Hive.md (EN/ZH): scope the 'options outside table_list are ignored' statement to connector options; framework options still apply.
|
Thanks for the careful re-check against the option classes. All four findings are addressed in 279af8d: the Iceberg table_list namespace row now documents that each item is overwritten by the root namespace (qualified db.table in table is the per-item override), the per-item streamScanStrategy default is corrected to FROM_LATEST_SNAPSHOT, the date/datetime/time format lists in LocalFile/HdfsFile are presented as examples, and the Hive root-options statement is scoped to connector options while noting framework options like plugin_output and parallelism still apply (EN and ZH updated in all four cases). |
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks @zhangshenghang for the quick turnaround. I reviewed the new head 279af8d901735d3774398547de9e14184c602c7c (commit "Address review findings on Iceberg table_list, format lists and Hive root options") on top of my previous review of 0ff2926c. All four findings from the last round are addressed, and I re-checked each fix against the source.
What Problem Does This PR Solve?
Pain point: several connector pages described options, enum values and placeholders that the code does not accept (MULTIPLEXING, DataHub ${table}, STRING -> ObjectId, Hive table_list inheritance) and omitted options that do exist.
Fix approach: documentation-only edits, mirrored in EN and ZH, each backed by a code reference.
One-sentence summary: align file, Hive, Iceberg, MongoDB, DataHub and common-option docs with what the source really does.
1. Code Change Review
1.1 Core Logic Analysis (verified against source)
Delta since my last review (0ff2926c -> 279af8d9, 8 doc files, 16 lines):
- Iceberg
table_listitem keynamespace(previous Issue 1): now documented as ignored, withdb.tableintableas the per-item override. This matchesIcebergSourceConfig.java:70, which doestableConfig.setNamespace(this.getNamespace())for every item. Fixed in EN and ZH. - Iceberg per-item
streamScanStrategydefault (previous Issue 2): nowFROM_LATEST_SNAPSHOT. This matchesSourceTableConfig.java:51(= KEY_STREAM_SCAN_STRATEGY.defaultValue()). Fixed in EN and ZH. - Date/time format lists (previous Issue 3): LocalFile and HdfsFile sink EN rows now say "Supported formats (examples)". See Issue 1 below for a small ZH inconsistency.
- Hive
table_listroot-options sentence (previous Issue 4): now scoped to connector options and says framework-level options such asplugin_outputandparallelismstill apply (EN and ZH).
The rest of the PR is unchanged from the head I already verified in the last round.
1.2 Compatibility Impact
Fully compatible. Documentation only; no code, option name or default changes.
1.3 Performance / Side-Effect Analysis
None.
1.4 Error Handling and Logging
Issue 1 (Low, non-blocking): ZH datetime_format rows were not given the "examples" wording.
- Location:
docs/zh/connectors/sink/HdfsFile.md:63anddocs/zh/connectors/sink/LocalFile.md:63(thedatetime_formatrows). - Problem description: in the new commit the ZH
date_formatandtime_formatrows were changed to read as an example list, but the ZHdatetime_formatrow still says "supported formats" without the qualifier, while the ENdatetime_formatrow was updated. The list there is still only a subset of what the code accepts. - Potential risk: a small EN/ZH mismatch; a ZH reader may read the list as exhaustive.
- Best improvement: apply the same wording to the two ZH
datetime_formatrows. - Severity: Low
- Raised by another reviewer: no
2. Code Quality Assessment
2.1 Coding Standards
Tables stay well-formed and EN/ZH are consistent apart from Issue 1. No code changed.
2.2 Test Coverage and Test Stability
Not applicable (docs only). No test files changed.
2.3 Documentation Updates
EN and ZH both updated for every item in the PR description. The only gap is Issue 1.
3. Architectural Soundness
3.1 Fix Type
Precise fix (corrections of incorrect statements, no workarounds).
3.2 Maintainability
Good. Each default and key is now traceable to an option class.
3.3 Extensibility
N/A for a docs-only change.
3.4 Historical Compatibility
No behavior change.
4. Issue Summary
| ID | Issue | Location | Severity |
|---|---|---|---|
| 1 | ZH datetime_format rows lack the "examples" wording |
docs/zh/connectors/sink/HdfsFile.md:63, docs/zh/connectors/sink/LocalFile.md:63 |
Low |
5. Merge Recommendation
Conclusion: Ready to merge
Blockers: none.
Recommended non-blocking fixes: Issue 1 (optional wording alignment in two ZH rows).
CI: the Build check for this head completed successfully, and the branch is up to date with dev (behind by 0). I did not run anything locally; this is a source and docs review.
Overall assessment: all previous findings are fixed and verified against the code. Thanks again for the careful, source-backed docs work.
Resolve Datahub.md (EN/ZH) conflicts: keep the dev-side placeholder description and FAQ wording consolidated by apache#13089.
Resolve JDBC-family source table and RocketMQ FAQ conflicts (EN/ZH): keep the dev-side wording verified in apache#12447/apache#12865/apache#13089 (DB2 BIGINT to LONG, DECIMAL(precision, scale), OceanBase merged unsigned rows and Number(p,s) qualification, partition-row formatting).
Resolve JDBC source table conflicts (EN/ZH): keep the dev-side rows verified in apache#12865/apache#13089 (Oracle NUMBER scale>0/scale<0 split, TIMESTAMP_TZ(s)/DATETIMEOFFSET(s) scale, PostgreSQL _BYTEA removal) and partition-row formatting.
Purpose of this PR
This PR is a documentation-only change that fixes real documentation issues found by auditing connector docs against the actual source code on
dev. I confirm that I am contributing to SeaTunnel.What documentation issues were found
Issues were verified line-by-line against connector code before editing:
dag-parsing.modedocumented a non-existent enum value (source-common-options.md, en+zh). Docs saidMULTIPLEXING, butParsingModeonly definesSINGLENESS,SHARDING, and the deprecatedMULTIPLEX. Setting the documented value fails enum parsing at job submission. Also, the deprecatedMULTIPLEXdescription was wrong (it means one source with separate sinks, not one source and one sink).Datahub.md, en+zh). Docs told users to use${table}and called${table_name}a "deprecated alias" — exactly backwards.TablePlaceholderhas no${table}; following the docs, the literal string${table}reaches the DataHub client and the job fails. Fixed all occurrences (description,topicsection, multi-table example, FAQ) and addedmulti_table_sink_replicato the option table.LocalFile.md,HdfsFile.md, source+sink, en+zh).null_formatalso applies tocsvreads, not onlytext(used byCsvReadStrategy); HdfsFileskip_header_row_numberalso applies to Excel (ExcelReadStrategyhonors it), not only txt/csv; HdfsFile sinkfield_delimiter/row_delimiterdescriptions contradicted themselves and the writers.LocalFile.md/HdfsFile.mdsink, en+zh).date_format/datetime_format/time_format(registered in both sink factories, used by text/csv/excel/xml writers) andmulti_table_sink_replica(LocalFile sink) were absent; HdfsFile source lackedexcel_use_header_lineand themarkdown_rag_metadata_enabled/pdf_rag_metadata_enabledtable rows (referenced only in prose).table_listinheritance claim was wrong (Hive.md, en+zh). Entries are parsed as standalone configs (ReadonlyConfig::fromMap) and do NOT inherit root-level options;metastore_urietc. must be repeated per entry. Also documented the missingnull_formatandparse_partition_from_pathoptions, noted that regex discovery (use_regex) requires a reachable metastore, and added${current_timestamp}to the sinksave_mode_create_templatevariable list (HiveTableTemplateUtilssubstitutes it).table_listper-item keys undocumented (Iceberg.md, en+zh). Items are deserialized by Jackson with camelCase field names (startSnapshotId,streamScanStrategy,splitSize,splitLookback,splitOpenFileCost, ...); copying the snake_case root names fails with unknown-property errors. Added a per-item key table in both languages.zh sink/+source/Iceberg.md). Added the missing "Glue Catalog" example section (parity with en) and replaced Englishyes/nocells with是/否.STRING -> ObjectId(MongoDB.md, en+zh). No sink code path produces anObjectId(RowDataToBsonConvertersonly emitsBsonString); removed the row and documented the actual behavior.What was changed
Which areas/files were updated
docs/{en,zh}/connectors/source/{LocalFile,HdfsFile,Hive,Iceberg}.mddocs/{en,zh}/connectors/sink/{LocalFile,HdfsFile,Hive,Iceberg,MongoDB,Datahub}.mddocs/{en,zh}/connectors/common-options/source-common-options.mdWere English and Chinese docs both checked?
Yes. Every fix was applied to both language versions; the Chinese Iceberg pages additionally received the missing Glue Catalog section and consistent
是/否required-column cells.How duplicate PRs from the last 7 days were checked
Listed all open PRs from the last week (
gh pr list --state open) and inspected the changed-file lists of my own recent open doc PRs: #13072, #13050, #12993, #12986, #12971, plus merged #13062/#13019 and the just-merged #11779. This PR deliberately targets only pages not covered by those PRs (file connectors, Hive, Iceberg, non-CDC MongoDB, DataHub, source common options). Overlapping connectors (JDBC, Kafka, MySQL/Oracle/PG/Redis, Clickhouse/Doris/StarRocks, CDC connectors, cloud file connectors, engine pages) were intentionally not touched here.How the change was verified
ParsingMode,TablePlaceholder,FormatOptions,SinkConnectorCommonOptions,FileBaseSourceOptions,SourceTableConfig,IcebergStreamScanStrategy,RowDataToBsonConverters,MultipleTableHiveSourceConfig,HiveTableTemplateUtils, sink factories, read/write strategies) before editing.MULTIPLEXING,${table}outside the explicit warning notes) and that anchors used in cross-references exist.