Repository navigation
[Docs] Fix DuckDB, Kingbase, SmbFile, Rabbitmq and other connector doc inaccuracies verified against source code - #12951
Conversation
…c inaccuracies verified against source code
DanielLeens
left a comment
There was a problem hiding this comment.
Hi @zhangshenghang, thanks a lot for this careful documentation audit. Checking docs against the converters and option rules is exactly the kind of work that keeps users from getting burned, and I enjoyed reading it.
This is a static review of head 1befa0d409dfa7b1626b9b707655416cdccf541e; I did not build the docs site or execute anything locally.
What Problem Does This PR Solve?
- User pain point: several connector pages contradicted the code (stale DuckDB type tables,
querymarked required for the DuckDB source, wrong KingbaseSMALLSERIALmapping, undocumented SmbFile options, a RabbitMQrabbitmq.configtip that has no effect), and a few zh pages lagged behind en. - Fix approach: docs-only edits across 20 files (10 en + 10 zh), aligned with
DuckDBTypeConverter,PostgresTypeConverter/KingbaseTypeConverter,JdbcSourceFactory,FileBaseSourceOptions,RabbitmqConfig/RabbitmqClient, and HBase source options. - Summary: a docs-only accuracy fix; every claim I spot-checked matches the code.
1. Code Change Review
1.1 Core Logic Analysis
No src/main changes. I verified each claim against the pinned SHA:
- DuckDB source mapping (
DuckDBTypeConverter.convert):UTINYINT -> BYTE,USMALLINT -> SHORT,UINTEGER -> INT,UBIGINT -> LONG,HUGEINT/UHUGEINT/BIGNUM -> DECIMAL(38,0),TIMESTAMP WITH TIME ZONE -> OFFSET_DATE_TIME(TIMESTAMP_TZ),ARRAY/STRUCT/MAP -> STRING. Matches the new table. Oversized DECIMAL keeps scale (handleDecimalType), soDECIMAL(38,y)is right. - DuckDB sink mapping (
reconvert): TINYINT/SMALLINT keep their own types,TIMESTAMP_TZ -> TIMESTAMP WITH TIME ZONE, and unsupported types (ARRAY/ROW/MAP) hitdefault -> convertToConnectorTypeError. Matches "Not supported". - DuckDB source
queryoptional:JdbcSourceFactory.optionRule()requires onlyURLandDRIVER;QUERYis optional. Correct. - Kingbase:
KingbaseTypeConverter extends PostgresTypeConverter, which mapssmallserial -> SHORT_TYPEandserial -> INT_TYPE. The corrected rows are right. - SmbFile:
EXCEL_USE_HEADER_LINE,MARKDOWN_RAG_METADATA_ENABLED,PDF_RAG_METADATA_ENABLEDexist inFileBaseSourceOptionsand are read by the Excel/Markdown/PDF read strategies. - RabbitMQ:
RabbitmqConfigstoresrabbitmq.configintosinkOptionPropsand that field has no other reader in the module;RabbitmqClientonly applies the typed options. The new note and FAQ wording are accurate, andnetwork_recovery_interval,topology_recovery_enabled,AUTOMATIC_RECOVERY_ENABLED,connection_timeoutare real option keys. - HBase: the option description in
HbaseSourceOptionssays "cells", andscan.setBatch(...)is used, so the wording fix is correct. - zh parity: the Aerospike
kvexample matches the en page (DataFormatType.KV,write_timeoutexist), and the Opengauss-CDC step 3 matches en.
1.2 Compatibility Impact
Fully compatible: documentation only, no config, default, or serialization change.
1.3 Performance / Side-Effect Analysis
None (docs only).
1.4 Error Handling and Logging
N/A. No blocking issues found.
2. Code Quality Assessment
2.1 Coding Standards
N/A for Java. The new markdown tables are a bit loose in column alignment in a few places (for example the zh DuckDB sink table), which does not affect rendering.
2.2 Test Coverage and Test Stability
No tests touched. Stability rating: n/a.
2.3 Documentation Updates
en and zh are updated in step. Two optional, non-blocking observations:
- Issue 1: Kingbase tables still list
INT2 -> SHORT- Location:
docs/en/connectors/{source,sink}/Kingbase.md(INT2 row, and the zh equivalents) - Problem: you fixed the non-canonical
LOCAL*names, butSHORTis also not a canonical SeaTunnel type name (the newSMALLSERIALrow saysSMALLINT), so the same table now uses two names for the same type. - Potential risk: minor reader confusion.
- Best improvement: change
SHORTtoSMALLINTin the same table. - Severity: Low
- Raised by another reviewer: No
- Location:
- Issue 2: SmbFile new option rows use
file_format_typewording- Location:
docs/en/connectors/source/SmbFile.mdnew rows - Problem: neighbouring rows say
file_format; harmless but slightly inconsistent. - Severity: Low (cosmetic)
- Raised by another reviewer: No
- Location:
3. Architectural Soundness
3.1 Elegance
Precise fix.
3.2 Maintainability
Good: each change is traceable to a concrete code location.
3.3 Extensibility
Not applicable.
3.4 Historical-Version Compatibility
No impact.
4. Issue Summary
| # | Issue | Severity | Blocking |
|---|---|---|---|
| 1 | Kingbase INT2 -> SHORT naming |
Low | No |
| 2 | SmbFile wording nit | Low | No |
5. Merge Recommendation
Conclusion: Ready to merge
- Blockers: none.
- Recommended non-blocking: the two Low items above.
- CI: the Build workflow is SUCCESS for this head. The branch is mergeable (the
blockedstate is only the pending required review); it is 12 commits behinddev, which is metadata only. - Overall: a high-quality docs audit, thanks again for the thorough source verification.
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:
DuckDBTypeConverter:UTINYINTwas documented asSMALLINT(actuallyTINYINT),USMALLINTasINT(actuallySMALLINT),UINTEGERasBIGINT(actuallyINT),UBIGINTasDECIMAL(20,0)(actuallyBIGINT),TIMESTAMP WITH TIME ZONEasTIMESTAMP(actuallyTIMESTAMP_TZ),ARRAY/STRUCT/MAPasBYTES(actuallySTRING);UHUGEINT/BIGNUMwere missing from theDECIMAL(38,0)row; oversizedDECIMALwas documented asDECIMAL(38,18)while the code preserves the original scale (DECIMAL(38,y)).TINYINT/SMALLINTwere documented as mapping toINTEGER(actually each keeps its own type), oversizedDECIMALasDECIMAL(38,18)(actuallyDECIMAL(38,y)), andARRAY/ROW/MAPasBLOBalthough the converter rejects them;TIMESTAMP_TZ → TIMESTAMP WITH TIME ZONEwas missing.querymarked as required: onlyurlanddriverare required inJdbcSourceFactory;queryis optional (table_path/table_listare alternatives). The doc itself even showed examples withoutquery.SMALLSERIALmapping (4 files):SMALLSERIALmaps toSMALLINT(viaPostgresTypeConverter, inherited byKingbaseTypeConverter), notINTtogether withSERIAL/INT4.LOCALDATETIME/LOCALTIME/LOCALDATEcorrected toTIMESTAMP/TIME/DATE, matchingPostgreSQL.mdand the actualLocalTimeTypemappings.excel_use_header_line,markdown_rag_metadata_enabledandpdf_rag_metadata_enabledare defined inFileBaseSourceOptionsand part of the SmbFile source option rule, but were undocumented.rabbitmq.configclaims (2 files): the FAQ and two examples recommended tuning connection resilience viarabbitmq.config, but the sink parses this option without ever applying it to the RabbitMQ client (sinkOptionPropshas no consumers;RabbitmqClientonly applies the dedicated typed options). Examples were cleaned up and the FAQ/option description now point to the real options.index_typesection header said[string]while the option is an enum (HoodieIndex.IndexType) and the doc's own table saysenum(2 files).batchwas 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 implementsSupportColumnProjection("column projection").double.fake.modedescription said "generating float data" (copy-paste from thefloatrow; the code says double) (1 file).timer flushfeature 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, plusdocs/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
DuckDBTypeConverter,PostgresTypeConverter/KingbaseTypeConverter,JdbcSourceFactoryoption rule,FileBaseSourceOptions+SmbFileSourceFactory,RabbitmqConfig/RabbitmqClient,FakeSourceOptions,HudiSinkOptions,HbaseSourceOptions).