trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
10.5k stars 3.02k forks source link

iceberg add_files - The procedure does not support partitioned tables #23866

Open raphaelauv opened 1 month ago

raphaelauv commented 1 month ago

on a partitioned table

CREATE TABLE iceberg.toto.a (
   id uuid NOT NULL,
   created_at timestamp(6) NOT NULL,
   a varchar NOT NULL,

)
WITH (
   format = 'PARQUET',
   format_version = 2,
   location = 's3://test-bucket/iceberg/toto/a',
   parquet_bloom_filter_columns = ARRAY['a'],
   partitioning = ARRAY['hour(created_at)']
)

if I run

USE iceberg.toto;
ALTER TABLE iceberg.toto.a
EXECUTE add_files(
    location => 's3://test-bucket/00000-930-31dc8978-e019-4903-910d-26cc48b8ba41-0-00001.parquet',
    format => 'PARQUET');

it fail with

SQL Error [30]: Query failed (#20241022_135228_00015_qp3tt): The procedure does not support partitioned tables

but without partitioning = ARRAY['hour(created_at)'] it work

raunaqmorarka commented 1 month ago

cc: @ebyhr