yraivo commented on issue #67485:
URL: https://github.com/apache/doris/issues/67485#issuecomment-7073666191

   Hi, I reproduced this against PostgreSQL 16.15 + PostGIS 3.4.2 using the 
`public.building` schema from the issue on both `4.1.3` and `master`.
   
   ### Root Cause
   `JdbcPostgreSQLClient#jdbcTypeToDoris` maps PostGIS `geometry` 
(`Types.OTHER`, `typeName="geometry"`) to `Type.UNSUPPORTED`.
   In `StreamingJobUtils#generateCreateTableCmds`, when the target table does 
not exist yet, `getColumns(...)` runs **before** `excludeColumns` are filtered 
(`4.1.3` `L405`, `master` `L448`), and `getColumns(...)` rejects any column 
with `Type.UNSUPPORTED` (`master` `L534`). As a result, `CREATE JOB` fails with 
`Unsupported column type` even when `geometry` is listed in 
`table.building.exclude_columns` (pre-creating the target table on `master` 
avoids `getColumns` via `#66950`).
   
   ### Verification
   - **FE (`StreamingJobUtils`)**: Validating `excludeColumns` against the full 
raw column list first, filtering out excluded columns, and normalizing/checking 
`!isUnsupported()` only on retained columns (`+10/-2` lines, keeping `public 
static getColumns(...)` unchanged) fixes auto-table creation while preserving 
the nonexistent-column and primary-key checks. Verified in 
`StreamingJobUtilsTest` (`19/19`) and against live PG 16 + PostGIS (the same 
ordering issue also exists in Draft PR `#68037`).
   - **`fs_brokers/cdc_client`**: Tested multi-split snapshot, WAL 
`INSERT/UPDATE/DELETE`, and `DROP/ADD COLUMN geometry` against live PG 16 + 
PostGIS with `exclude_columns = "geometry"`. `cdc_client` already omits 
`geometry` cleanly without extra changes.
   
   Reproducer tests and minimal fix on `master`: 
https://github.com/yraivo/doris/compare/b5e58773dc94...repro-67485-pg-postgis-exclude
   
   @fine-1 Could you confirm if your error was thrown right at `CREATE JOB`? 
And for maintainers, would you prefer a small PR against `master` now, or after 
`#68037` lands?
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to