---------------------------------------------------------------------------
ConversionException Traceback (most recent call last)
File /nix/store/c59aracavmb6n2dxmfnf0a55yl6pdg96-ibis-3.11/lib/python3.11/site-packages/IPython/core/formatters.py:711, in PlainTextFormatter.__call__(self, obj)
704 stream = StringIO()
705 printer = pretty.RepresentationPrinter(stream, self.verbose,
706 self.max_width, self.newline,
707 max_seq_length=self.max_seq_length,
708 singleton_pprinters=self.singleton_printers,
709 type_pprinters=self.type_printers,
710 deferred_pprinters=self.deferred_printers)
--> 711 printer.pretty(obj)
712 printer.flush()
713 return stream.getvalue()
File /nix/store/c59aracavmb6n2dxmfnf0a55yl6pdg96-ibis-3.11/lib/python3.11/site-packages/IPython/lib/pretty.py:419, in RepresentationPrinter.pretty(self, obj)
408 return meth(obj, self, cycle)
409 if (
410 cls is not object
411 # check if cls defines __repr__
(...)
417 and callable(_safe_getattr(cls, "__repr__", None))
418 ):
--> 419 return _repr_pprint(obj, self, cycle)
421 return _default_pprint(obj, self, cycle)
422 finally:
File /nix/store/c59aracavmb6n2dxmfnf0a55yl6pdg96-ibis-3.11/lib/python3.11/site-packages/IPython/lib/pretty.py:794, in _repr_pprint(obj, p, cycle)
792 """A pprint that just redirects to the normal repr function."""
793 # Find newlines and replace them with p.break_()
--> 794 output = repr(obj)
795 lines = output.splitlines()
796 with p.group():
File ~/work/ibis/ibis/ibis/expr/types/core.py:83, in Expr.__repr__(self)
81 def __repr__(self) -> str:
82 if ibis.options.interactive:
---> 83 return _capture_rich_renderable(self)
84 else:
85 return self._noninteractive_repr()
File ~/work/ibis/ibis/ibis/expr/types/core.py:63, in _capture_rich_renderable(renderable)
61 console = Console(force_terminal=False)
62 with console.capture() as capture:
---> 63 console.print(renderable)
64 return capture.get().rstrip()
File /nix/store/c59aracavmb6n2dxmfnf0a55yl6pdg96-ibis-3.11/lib/python3.11/site-packages/rich/console.py:1705, in Console.print(self, sep, end, style, justify, overflow, no_wrap, emoji, markup, highlight, width, height, crop, soft_wrap, new_line_start, *objects)
1703 if style is None:
1704 for renderable in renderables:
-> 1705 extend(render(renderable, render_options))
1706 else:
1707 for renderable in renderables:
File /nix/store/c59aracavmb6n2dxmfnf0a55yl6pdg96-ibis-3.11/lib/python3.11/site-packages/rich/console.py:1306, in Console.render(self, renderable, options)
1304 renderable = rich_cast(renderable)
1305 if hasattr(renderable, "__rich_console__") and not isclass(renderable):
-> 1306 render_iterable = renderable.__rich_console__(self, _options)
1307 elif isinstance(renderable, str):
1308 text_renderable = self.render_str(
1309 renderable, highlight=_options.highlight, markup=_options.markup
1310 )
File ~/work/ibis/ibis/ibis/expr/types/core.py:106, in Expr.__rich_console__(self, console, options)
103 if opts.interactive:
104 from ibis.expr.types.pretty import to_rich
--> 106 rich_object = to_rich(self, console_width=console_width)
107 else:
108 rich_object = Text(self._noninteractive_repr())
File ~/work/ibis/ibis/ibis/expr/types/pretty.py:275, in to_rich(expr, max_rows, max_columns, max_length, max_string, max_depth, console_width)
272 from ibis.expr.types import Scalar
274 if isinstance(expr, Scalar):
--> 275 return _to_rich_scalar(
276 expr, max_length=max_length, max_string=max_string, max_depth=max_depth
277 )
278 else:
279 return _to_rich_table(
280 expr,
281 max_rows=max_rows,
(...)
286 console_width=console_width,
287 )
File ~/work/ibis/ibis/ibis/expr/types/pretty.py:299, in _to_rich_scalar(expr, max_length, max_string, max_depth)
290 def _to_rich_scalar(
291 expr: Scalar,
292 *,
(...)
295 max_depth: int | None = None,
296 ) -> Pretty:
297 value = format_values(
298 expr.type(),
--> 299 [expr.to_pyarrow().as_py()],
300 max_length=max_length or ibis.options.repr.interactive.max_length,
301 max_string=max_string or ibis.options.repr.interactive.max_string,
302 max_depth=max_depth or ibis.options.repr.interactive.max_depth,
303 )[0]
304 return Panel(value, expand=False, box=box.SQUARE)
File ~/work/ibis/ibis/ibis/expr/types/core.py:511, in Expr.to_pyarrow(self, params, limit, **kwargs)
483 @experimental
484 def to_pyarrow(
485 self,
(...)
489 **kwargs: Any,
490 ) -> pa.Table:
491 """Execute expression and return results in as a pyarrow table.
492
493 This method is eager and will execute the associated expression
(...)
509 A pyarrow table holding the results of the executed expression.
510 """
--> 511 return self._find_backend(use_default=True).to_pyarrow(
512 self, params=params, limit=limit, **kwargs
513 )
File ~/work/ibis/ibis/ibis/backends/duckdb/__init__.py:1400, in Backend.to_pyarrow(self, expr, params, limit, **_)
1392 def to_pyarrow(
1393 self,
1394 expr: ir.Expr,
(...)
1398 **_: Any,
1399 ) -> pa.Table:
-> 1400 table = self._to_duckdb_relation(expr, params=params, limit=limit).arrow()
1401 return expr.__pyarrow_result__(table)
ConversionException: Conversion Error: Could not convert string 'a string' to INT64
LINE 1: SELECT CAST('a string' AS BIGINT) AS "Cast('a ...
^