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

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   ### Paimon version
   
   master (f8cbb66c45)
   
   ### Compute Engine
   
   Hive 2.3 / 3.1
   
   ### Minimal reproduce step
   
   Create a Paimon Hive catalog with `'location-in-properties' = 'true'` and, 
from Flink:
   
   ```sql
   CREATE TABLE t (a INT, b STRING);
   INSERT INTO t VALUES (1, 'apple'), (2, 'banana');
   ```
   
   Then in Hive:
   
   ```sql
   SELECT * FROM t;
   ```
   
   ### What doesn't meet your expectations?
   
   Hive returns no rows and reports no error.
   
   With `location-in-properties`, the Paimon path is stored only in the 
`paimon_location` table parameter, and the metastore location of the table is 
Hive's warehouse default. `HiveSplitGenerator` skips every input location that 
does not start with the Paimon table location (the check added in #5891 for 
Hive dummy files), so it plans no split.
   
   Hive does not create dummy files for storage-handler tables 
(`Utilities.createDummyFileForEmptyTable` and 
`createDummyFileForEmptyPartition` return early for non-native tables), so for 
a table without Hive partitions the input location is the table's own metastore 
location.
   
   ### Anything else?
   
   Tables with Hive partitions (`metastore.partitioned-table = true`) stay 
unreadable from Hive in this mode: all their partitions share the table 
location, so the input path cannot tell them apart. Fixing that means writing 
the partition path into the partition's metastore location, which is a separate 
change.
   
   ### 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