SEZ9 commented on issue #12873:
URL: https://github.com/apache/seatunnel/issues/12873#issuecomment-6258902434

   Thanks for the detailed report and reproduction. The root cause analysis 
(truncateTableInternal() using executeInternal(defaultUrl, ...) while 
PostgreSQL's TRUNCATE SQL is only schema-qualified) is consistent with the 
existence check in truncateTable() resolving the table database URL. Please go 
ahead with the fix: resolve the URL via 
getUrlFromDatabaseName(tablePath.getDatabaseName()) when a database is present 
and fall back to defaultUrl otherwise, mirroring the sibling DDL paths 
(create/drop table).
   
   Please make sure the test added to AbstractJdbcCatalogTest and 
JdbcPostgresIT asserts row counts in both databases (A=1, B=0) and that other 
dialects extending AbstractJdbcCatalog (e.g. MySQL, Oracle, SQL Server, DuckDB 
overrides from #12673) are not affected by the URL selection change. Also check 
whether dropTable/other internal paths share the same defaultUrl routing so 
they can be fixed together.
   
   Please link the PR to this issue and add a concise note in the JDBC catalog 
docs (English and Chinese) only if the behavior change is user-visible; 
otherwise a changelog/PR description entry is sufficient.
   
   <!-- streview-comment:1868 -->


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

Reply via email to