From b2761c944684aac26fe5f77f349371304aeab7cb Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Sat, 20 Jan 2024 05:38:14 -0500 Subject: [PATCH] fix(trino): compile property literal values directly instead of going throughh the pipeline --- ibis/backends/trino/__init__.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ibis/backends/trino/__init__.py b/ibis/backends/trino/__init__.py index 7122241c56c1..72ee1b48edc0 100644 --- a/ibis/backends/trino/__init__.py +++ b/ibis/backends/trino/__init__.py @@ -431,13 +431,13 @@ def create_table( else: target = table_ref - property_list = [ - sge.Property( - this=sg.to_identifier(k), - value=self.compiler.translate(ibis.literal(v).op(), params={}), - ) - for k, v in (properties or {}).items() - ] + property_list = [] + + for k, v in (properties or {}).items(): + name = sg.to_identifier(k) + expr = ibis.literal(v) + value = self.compiler.visit_Literal(expr.op(), value=v, dtype=expr.type()) + property_list.append(sge.Property(this=name, value=value)) if comment: property_list.append(sge.SchemaCommentProperty(this=sge.convert(comment)))