Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ge_as_arrow raise exception when use int32 or int16 #1482

Closed
wenhoujx opened this issue Apr 22, 2023 · 0 comments · Fixed by #1483
Closed

ge_as_arrow raise exception when use int32 or int16 #1482

wenhoujx opened this issue Apr 22, 2023 · 0 comments · Fixed by #1483

Comments

@wenhoujx
Copy link
Contributor

wenhoujx commented Apr 22, 2023

i have 3 simple python test case with kuzu 0.0.3: the only diffs are int32, int16 and int64. 32 and 16 throws exception at get_as_arrow. only 64 works.

def test_int32():
    db = kuzu.Database(f"./testdbs/test-{_random_id()}")
    conn = kuzu.Connection(db)
    conn.execute("CREATE NODE TABLE User(name STRING, age INT32, PRIMARY KEY (name))")
    conn.execute("CREATE (u:User {name: 'Alice', age: 35})")
    conn.execute("match(u:User) return u").get_as_arrow(chunk_size=10)


def test_int16():
    db = kuzu.Database(f"./testdbs/test-{_random_id()}")
    conn = kuzu.Connection(db)
    conn.execute("CREATE NODE TABLE User(name STRING, age INT16, PRIMARY KEY (name))")
    conn.execute("CREATE (u:User {name: 'Alice', age: 35})")
    conn.execute("match(u:User) return u").get_as_arrow(chunk_size=10)


def test_int64():
    db = kuzu.Database(f"./testdbs/test-{_random_id()}")
    conn = kuzu.Connection(db)
    conn.execute("CREATE NODE TABLE User(name STRING, age INT64, PRIMARY KEY (name))")
    conn.execute("CREATE (u:User {name: 'Alice', age: 35})")
    conn.execute("match(u:User) return u").get_as_arrow(chunk_size=10)

stacktrace.

./testing/test_cases/test_play.py::test_int32 Failed: [undefined]RuntimeError: Unsupported Arrow type INT32
def test_int32():
        db = kuzu.Database("./testdbs/test-3")
        conn = kuzu.Connection(db)
        conn.execute("CREATE NODE TABLE User(name STRING, age INT, PRIMARY KEY (name))")
        conn.execute("CREATE (u:User {name: 'Alice', age: 35})")
>       conn.execute("match(u:User) return u").get_as_arrow(chunk_size=10)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant