Some of these issues may be fixed in ARROW-17915 [1].
[1] https://github.com/apache/arrow/pull/14295
On Wed, Oct 5, 2022 at 12:07 PM Will Jones wrote:
> I can confirm that fixes that issue in the simple case. But if result is
> either of these, we get an error:
>
> result = compiler.compile(t.s
I can confirm that fixes that issue in the simple case. But if result is
either of these, we get an error:
result = compiler.compile(t.select("b"))
# leads to:
Traceback (most recent call last):
File "", line 1, in
File "pyarrow/_substrait.pyx", line 140, in pyarrow._substrait.run_query
c
Ok I think I got a working version now:
t = ibis.table([("a", "int64"), ("b", "int64")], name="table0")
test_table_0 = pa.Table.from_pydict({"a": [1, 2, 3], "b": [4, 5,
6]})
result = self.compiler.compile(t)
def table_provider(names):
if not name
Hmm. Thanks for the update - Now I searched the code more, it seems perhaps
I should be using "compile" rather than "translate";
https://github.com/ibis-project/ibis-substrait/blob/main/ibis_substrait/compiler/core.py#L82
Let me try some more
On Wed, Oct 5, 2022 at 1:42 PM Will Jones wrote:
>
Hi Li Jin,
The original segfault seems to occur because you are passing a Python bytes
object and not a PyArrow Buffer object. You can wrap the bytes object using
pa.py_buffer():
pa.substrait.run_query(pa.py_buffer(result_bytes), table_provider)
That being said, when I run your full example wit
For reference, this is the "relations" entry that I was referring to:
https://github.com/apache/arrow/blob/master/python/pyarrow/tests/test_substrait.py#L186
On Tue, Oct 4, 2022 at 3:28 PM Li Jin wrote:
> So I made some progress with updated code:
>
> t = ibis.table([("a", "int64"), ("b"
So I made some progress with updated code:
t = ibis.table([("a", "int64"), ("b", "int64")], name="table0")
test_table_0 = pa.Table.from_pydict({"a": [1, 2, 3], "b": [4, 5,
6]})
result = translate(t, self.compiler)
def table_provider(names):
if no