Trino returning zero records for Hudi tables in Glue

Hello

Any help on this would be appreciated. Our setup in AWS is as follows:

  • Trino on EKS: version 465
  • HMS: Glue. We have database for both Hudi and non-Hudi external tables for parquet files.

Currently we are able to query non-Hudi tables successfully.

For Hudi tables the query executes without any error but returns zero records. We have confirmed that records should be returned by executing the same query in Athena.

We have two catalogs setup as follows:

(1) /etc/trino/catalog/awsdatacatalog.properties

connector.name=hive
hive.metastore=glue
hive.hive-views.enabled=true
hive.partition-projection-enabled=true
fs.native-s3.enabled=true
hive.hudi-catalog-name=hudi

(2) /etc/trino/catalog/hudi.properties

connector.name=hudi
hive.metastore=glue
fs.native-s3.enabled=true

We do have partition projection enabled for Hudi tables.

Zero records are returned for Hudi tables whether we use awsdatacatalog or hudi catalog

select *
from awsdatacatalog.db1.test_table_ro
where partition1 = "123"
and partition2 = "abc"
limit 10;
select *
from hudi.db2.test_table_ro
where partition1 = "123"
and partition2 = "abc"
limit 10;

Any suggestions on how to figure out the reason for zero records being returned.

Thank you,
Deepak

hi @deepakr - i found this in the trino github. Cannot query Hudi table 'xxx.yyy' · Issue #17008 · trinodb/trino · GitHub

It looks like using the Hive connector to query hudi is an expected problem. Can you try using the Hudi connector?

@monimiller thanks for looking into this.

I have both Hive ( /etc/trino/catalog/awsdatacatalog.properties) & Hudi (/etc/trino/catalog/hudi.properties) connector configured. Hive connector is also using table redirection for Hudi.

Even when I use the Hudi connector as shown in query below, I get zero records with no error:

select *
from hudi.db2.test_table_ro
where partition1 = "123"
and partition2 = "abc"
limit 10;