File tree 2 files changed +17
-1
lines changed
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 16
16
import pytest
17
17
18
18
import ibis
19
+ import ibis .common .exceptions as exc
19
20
from ibis import config
20
21
21
22
@@ -89,3 +90,18 @@ def test_isin_rule_suppressed_exception_repr_not_fail(table):
89
90
expr = table .filter (bool_clause )["string_col" ].value_counts ()
90
91
91
92
repr (expr )
93
+
94
+
95
+ def test_no_recursion_error (con , monkeypatch ):
96
+ monkeypatch .setattr (ibis .options , "interactive" , True )
97
+ monkeypatch .setattr (ibis .options , "default_backend" , con )
98
+
99
+ a = ibis .memtable ({"a" : [1 ]})
100
+ b = ibis .memtable ({"b" : [1 ]})
101
+
102
+ expr = a .count () + b .count ()
103
+
104
+ with pytest .raises (
105
+ exc .RelationError , match = "The scalar expression cannot be converted"
106
+ ):
107
+ repr (expr )
Original file line number Diff line number Diff line change @@ -1366,7 +1366,7 @@ def as_table(self) -> ir.Table:
1366
1366
return parent .to_expr ().aggregate (self )
1367
1367
else :
1368
1368
raise com .RelationError (
1369
- f "The scalar expression { self } cannot be converted to a "
1369
+ "The scalar expression cannot be converted to a "
1370
1370
"table expression because it involves multiple base table "
1371
1371
"references"
1372
1372
)
You can’t perform that action at this time.
0 commit comments