DanielCarter-stack commented on issue #10597:
URL: https://github.com/apache/seatunnel/issues/10597#issuecomment-4054654048

   <!-- code-pr-reviewer -->
   Thanks for reporting this issue. I've verified that `partitionKeys` is 
indeed hardcoded to an empty list in the JDBC connector.
   
   **Evidence:**
   - `AbstractJdbcCatalog#getTable()` (line 237): returns 
`Collections.emptyList()` for partitionKeys
   - `JdbcCatalogUtils.getCatalogTable()` (lines 336-342): returns `new 
ArrayList<>()` for partitionKeys
   
   This differs from other connectors:
   - `HiveMetaStoreCatalog.java` (lines 646-652): extracts partition keys from 
`hiveTable.getPartitionKeys()`
   - `IcebergCatalog.java` (lines 314-317): extracts from 
`icebergTable.spec().fields()`
   
   **Root cause:** Standard JDBC `DatabaseMetaData` API doesn't provide 
partition information directly. Database-specific implementations are needed 
(e.g., querying `SHOW PARTITIONS` for Hive, system catalogs for 
PostgreSQL/Oracle).
   
   **Questions to help scope the fix:**
   1. Which database(s) are you primarily targeting (Hive, PostgreSQL, MySQL, 
etc.)?
   2. Should partition keys be auto-detected from metadata or user-configurable?
   3. How will partition keys be used—metadata only, or for partition 
pruning/parallel read optimization?
   
   A potential approach would be adding `getPartitionKeys()` to `JdbcDialect` 
for database-specific implementations. Let us know your target database, and we 
can provide more specific guidance.


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