hudi icon indicating copy to clipboard operation
hudi copied to clipboard

[SUPPORT]- HUDI table returns no records when queried using Hive with partition columns in where clause

Open deep-teliacompany opened this issue 5 years ago • 6 comments

HUDI table returns no records when queried using Hive with partition columns in where clause. While same query returns expected records perfectly in Impala

Hudi Table created in hive- CREATE EXTERNAL TABLE t_test_hudi (
_hoodie_commit_time string, _hoodie_commit_seqno string, _hoodie_record_key string, _hoodie_partition_path string, _hoodie_file_name string, DagName string, sequence_number int, dt_timestamp date, cdl_ingest_time string) PARTITIONED BY ( ing_year int, ing_month int, ing_day int ) ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe' STORED AS INPUTFORMAT 'org.apache.hudi.hadoop.HoodieParquetInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat' LOCATION '/data/test/swe/base/dummy/';

While below query works fine - "Select * from t_test_hudi"

Expected behavior Query -"Select * from t_test_hudi where ing_year=2021 and ing_month=4 and ing_day=4" should return records

Environment Description Hudi version : 0.8.0 Spark version : 2.4.3 Hive version : 3.1 Hadoop version : Distribution CDH-7.1.4 Storage (HDFS/S3/GCS..) : HDFS Running on Docker? (yes/no) : No

deep-teliacompany avatar Jun 22 '21 08:06 deep-teliacompany

@deep-teliacompany Are you using hive sync tool to create hudi tables in hive? If yes, can you share hive_sync properties? If not, can you try with hive sync?

codope avatar Aug 25 '21 10:08 codope

@deep-teliacompany : Can you please respond.

nsivabalan avatar Sep 13 '21 17:09 nsivabalan

Hi, I am not using hive sync tool, will try and and will share the observations.

deep-teliacompany avatar Sep 16 '21 09:09 deep-teliacompany

@deep-teliacompany any updates for us?

vinothchandar avatar Sep 23 '21 23:09 vinothchandar

@deep-teliacompany : would appreciate if you can respond so that we can investigate further.

nsivabalan avatar Dec 12 '21 15:12 nsivabalan

@deep-teliacompany : will go ahead and close out the issue if we don't hear back from you. Hive sync tool should work for you as proposed above. Or you can set appropriate hive sync configs and hudi writes will take care of syncing. Feel free to re-open if you still have issues or open a new issue if you are having some other problems. would be happy to assist.

nsivabalan avatar Dec 20 '21 03:12 nsivabalan