nicholasxu opened a new issue, #10465:
URL: https://github.com/apache/hudi/issues/10465
**Describe the problem you faced**
I use Flink write HUDI MOR table, and Flink read table normally, while RO
table and RT table read nothing by hive
**To Reproduce**
Steps to reproduce the behavior:
1. Create hive catalog as follows:
CREATE CATALOG hudi_hive_catalog
WITH (
'type'='hudi',
'catalog.path' = 'cosn://bigdata-xxx/user/hive/warehouse',
'hive.conf.dir' = '/usr/local/service/hive/conf',
'mode'='hms',
'table.external' = 'true',
'default-database' = 'hudi_default'
);
2. Use catalog and create table as follows:
use CATALOG hudi_hive_catalog;
CREATE TABLE t1(
mid BIGINT PRIMARY KEY NOT ENFORCED,
uuid VARCHAR(20),
name VARCHAR(10),
age INT,
ts BIGINT,
part INT
)
PARTITIONED BY (part)
WITH (
'connector' = 'hudi',
'path' = 'cosn://bigdata-xxx/user/hive/warehouse/hudi_default.db/t1',
'table.type' = 'MERGE_ON_READ',
'hive_sync.enable' = 'true',
'hive_sync.mode' = 'hms',
'hive_sync.metastore.uris' = 'thrift://xxx:9083'
)
3.Insert some data by Flink
INSERT INTO t1
VALUES
(1,'334e26e9-8355-45cc-97c6-c31daf0df330','nick', 18,1695159649087,20230108),
(2,'334e26e9-8355-45cc-97c6-c31daf0df330','jack', 18,1695159649087,20230109);
4.Read data by Flink and get right records
SELECT * FROM t1;

5. Use 'select *' reading data by Hive and get nothing
select * from t1_rt;

select * from t1_ro;

7. Read data with 'order by clause' by Hive and get right results
select * from t1_rt order by mid;

select * from t1_ro order by mid;

8.Huid files on cos:

9.Test COW table is ok
**Expected behavior**
Reading nothing from RO table may be OK, because it only has a log file and
without parquet base files,
but reading nothing from RT table is confused, your help is appreciative.
**Environment Description**
* Hudi version :0.14.1
* Spark version :3.2.2
* Hive version :3.1.3
* Hadoop version :3.2.2
* Storage (HDFS/S3/GCS..) :COS on Tencent Cloud
* Running on Docker? (yes/no) :
--
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]