https://delta.io logo
k

Kiran Gourish

01/19/2023, 6:11 PM
Hi Team, We are trying to query delta data in presto and we are facing problems when querying data while using partition columns of date format in filtering condition. Basically the problem is presto is considering the partition column as Timestamp or maybe string instead of actual date type. Below is the example: if we directly query with condition:
Copy code
presto> select * from delta.bi_data_etl.days where day = date '2023-01-12';
 dummy | day 
-------+-----
(0 rows)
if we query with condition by casting day to date,
Copy code
presto> select * from delta.bi_data_etl.days where date(day) = date '2023-01-12';
 dummy |  day   
-------+------------
 x   | 2023-01-12 
(1 row)
But if we look at the schema of the table in presto it shows day as date which is correct,
Copy code
presto> show create table delta.bi_data_etl.days;
       Create Table        
---------------------------------------
 CREATE TABLE delta.bi_data_etl.days ( 
  "dummy" varchar,          
  "day" date             
 )                   
(1 row)
Our presto cluster is configured to use delta connector as suggested here: https://prestodb.io/docs/current/connector/deltalake.html Metastore used: Hive Also, We checked the schema from spark and it looks like datatype for day is date and while querying delta table via spark it works fine. Can anyone here help us understand what could be the issue with presto? Why presto is not able to read partition column day as date?
s

Scott Sandre (Delta Lake)

01/19/2023, 11:53 PM
cc @Venki
k

Kiran Gourish

01/23/2023, 3:48 PM
Hi @Venki , Since Scott tagged you I thought of following up with you on this, (Sorry if I am bothering you) Have you experienced this issue before? maybe you could guide us if we are missing something. It would be of great help. Thank you very much in advance.
3 Views