LuciferYang opened a new issue, #10250:
URL: https://github.com/apache/paimon/issues/10250

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   ### Paimon version
   
   master
   
   ### Compute Engine
   
   Flink / Spark (DDL, filesystem/JDBC catalog)
   
   ### Minimal reproduce step
   
   Two independent problems in `AbstractCatalog` (and the duplicated dispatch 
in `JdbcCatalog`), both reachable through normal DDL on non-REST catalogs.
   
   1. The create-table switch over `TableType` handles `TABLE`, 
`MATERIALIZED_TABLE`, `FORMAT_TABLE` and `OBJECT_TABLE` but has no default 
branch. `LANCE_TABLE` and `ICEBERG_TABLE` were later added to the enum for the 
REST catalog. On a filesystem or JDBC catalog, `CREATE TABLE ... WITH ('type' = 
'lance-table')` parses to a valid `TableType`, passes `validateCreateTable`, 
reaches the switch, matches no case and falls through, so `createTable` returns 
normally while nothing is written and every later access fails with 
`TableNotExistException`.
   2. `data-file.external-paths` is documented as multiple elements separated 
by commas, and the write path (`AbstractFileStore.createExternalPaths`) trims 
each element. `dropTable` resolves the same option through 
`getSchemaExternalPaths`, which splits the raw value on comma and feeds each 
token straight into `new Path` with no trimming. A normal multi-value setting 
such as `oss://bucket/a, oss://bucket/b` produces the token ` oss://bucket/b`, 
whose leading space makes `new Path` throw, so the table can no longer be 
dropped.
   
   ### What doesn't meet your expectations?
   
   An unsupported table type should be rejected with a clear error at create 
time rather than silently ignored. And a table whose external paths were 
written correctly should be droppable; drop should parse external paths the 
same way the write path does, trimming each element and skipping blanks.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!
   


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