Ibis + Substrait
This repo houses the Substrait compiler for ibis.
We're just getting started here, so stay tuned!
Usage
>>> import ibis
>>> t = ibis.table(
[("a", "string"), ("b", "float"), ("c", "int32"), ("d", "int64"), ("e", "int64")],
"t",
)
>>> expr = t.group_by(["a", "b"]).aggregate([t.c.sum().name("sum")]).select("b", "sum")
>>> expr
r0 := UnboundTable: t
a string
b float64
c int32
d int64
e int64
r1 := Aggregation[r0]
metrics:
sum: Sum(r0.c)
by:
a: r0.a
b: r0.b
Selection[r1]
selections:
b: r1.b
sum: r1.sum
>>> ibis.show_sql(expr)
SELECT
t0.b,
t0.sum
FROM (
SELECT
t1.a AS a,
t1.b AS b,
SUM(t1.c) AS sum
FROM t AS t1
GROUP BY
t1.a,
t1.b
) AS t0
>>> from ibis_substrait.compiler.core import SubstraitCompiler
>>> compiler = SubstraitCompiler()
>>> proto = compiler.compile(expr)
Metadata
Release files for ibis-substrait 4.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ibis_substrait-4.0.1.tar.gz | 94.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ibis_substrait-4.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 211.1 kB
Release files / ibis_substrait-4.0.1.tar.gz
| Download URL | ibis_substrait-4.0.1.tar.gz |
|---|---|
| Size | 94.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
614810a173d096fbc49d87a9b419e2162a3c25d8efda1a4d57a389ce56b9041f
|
|
BLAKE2b-256 checksum How to use checksums |
1fc7311e42dfd84712cb8ac728bdc0b530a0933b79d23f530731863ad3ee42a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1024-azure
|
Release files / ibis_substrait-4.0.1-py3-none-any.whl
| Download URL | ibis_substrait-4.0.1-py3-none-any.whl |
|---|---|
| Size | 116.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
107ca49383a3cca2fdc88f67ea2f0172620c16fa8f39c9c52305af85dd6180b4
|
|
BLAKE2b-256 checksum How to use checksums |
b453959881915048b09cf54852d08f13ad8706bd680205df8b17e9898e0eb63c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1024-azure
|