Skip to content

Commit

Permalink
fix(trino): compile property literal values directly instead of going…
Browse files Browse the repository at this point in the history
… throughh the pipeline
  • Loading branch information
cpcloud authored and kszucs committed Feb 12, 2024
1 parent 1972645 commit b2761c9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ibis/backends/trino/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit b2761c9

Please sign in to comment.