Skip to content
Discussion options

You must be logged in to vote

I think memtables may be confusing understanding here. Let's stick with named tables inside a database, just for the sake of simplicity.

Here's an example using DuckDB and abstract expressions:

import ibis

# 1. create abstract expressions without a backend
t = ibis.table(dict(key="string", value="float"), name="t")  # the name matters here
expr = t.group_by("key").agg(sum_value=t.value.sum())

# 2. create some data that matches the schemas of the leaf tables involved
con = ibis.duckdb.connect()
with con.begin() as c:
    c.exec_driver_sql("""
        create or replace table t as
        select unnest(string_split('aaaaaabbbb', '')) as key, unnest(range(10)) as value;
    """)

# 3. execu…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@omriel1
Comment options

@omriel1
Comment options

@cpcloud
Comment options

Answer selected by omriel1
@omriel1
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants