github-actions[bot] commented on code in PR #65325:
URL: https://github.com/apache/doris/pull/65325#discussion_r3557126855


##########
fs_brokers/cdc_client/src/main/java/org/apache/doris/cdcclient/source/deserialize/PostgresDebeziumJsonDeserializer.java:
##########
@@ -200,7 +209,7 @@ private DeserializeResult handleSchemaChangeEvent(
                             targetTable,
                             col.name(),
                             SchemaChangeHelper.buildAddColumnSql(
-                                    db, targetTable, col.name(), colType, 
null, null)));
+                                    db, targetTable, col.name(), colType)));

Review Comment:
   The PostgreSQL fetch/debug paths still have the same write-path-only target 
DB assumption. `PostgresSourceReader` defaults `schema_change_enabled` to true, 
and both `/api/fetchRecords` and `/api/fetchRecordStream` pass the raw 
`FetchRecordRequest` config into `sourceReader.deserialize(...)`; unlike 
`writeRecords()`, they never add `Constants.DORIS_TARGET_DB` and they do not 
handle `SCHEMA_CHANGE` results. If a direct Postgres fetch sees a Relation 
ADD/DROP, this call builds Doris DDL with `db == null`, and 
`SchemaChangeHelper.quoteTableIdentifier()` dereferences it while the fetch 
path cannot execute that DDL anyway. The normal FE TVF now forces 
`schema_change_enabled=false`, but the public/debug fetch endpoints remain 
exposed to this by default. Please keep schema-change records disabled for all 
fetch paths, or carry target context and handle schema-change results there 
instead of building DDL with a null target DB.



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