Skip to content

Commit 25061ad

Browse files
committed
fix(trino): make SQL generation work (but not run)
1 parent b40103e commit 25061ad

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ibis/backends/sql/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ def _build_upsert_from_table(
639639
),
640640
),
641641
into=sg.table(target, db=db, catalog=catalog, quoted=quoted).as_(
642-
sg.to_identifier(target_alias, quoted=quoted)
642+
sg.to_identifier(target_alias, quoted=quoted), table=True
643643
),
644644
using=f"({self.compile(source)}) AS {sg.to_identifier(source_alias, quoted=quoted)}",
645645
on=sge.Paren(

ibis/backends/tests/test_client.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
PyDruidProgrammingError,
3838
PyODBCProgrammingError,
3939
SnowflakeProgrammingError,
40+
TrinoUserError,
4041
)
4142
from ibis.util import gen_name
4243

@@ -655,6 +656,9 @@ def _emp(a, b, c, d):
655656

656657

657658
@pytest.mark.notimpl(["polars"], reason="`upsert` method not implemented")
659+
@pytest.mark.notyet(
660+
["trino"], raises=TrinoUserError, reason="connector does not support modifying table rows"
661+
)
658662
def test_upsert_from_dataframe(
659663
backend, con, employee_data_1_temp_table, test_employee_data_3
660664
):
@@ -673,6 +677,9 @@ def test_upsert_from_dataframe(
673677

674678

675679
@pytest.mark.notimpl(["polars"], reason="`upsert` method not implemented")
680+
@pytest.mark.notyet(
681+
["trino"], raises=TrinoUserError, reason="connector does not support modifying table rows"
682+
)
676683
def test_upsert_from_expr(
677684
backend, con, employee_data_1_temp_table, employee_data_3_temp_table
678685
):

0 commit comments

Comments
 (0)