ibis icon indicating copy to clipboard operation
ibis copied to clipboard

bug: type error when accessing `length()` without schema information

Open choucavalier opened this issue 11 months ago • 12 comments

What happened?

The following example is self-explanatory

By default, it's assumed that t.some_col is of type Column, while it could be of type ArrayColumn (or other more specific types for that matter).

This results in typing issues.

import ibis
import pandas as pd


d = pd.DataFrame(
  {
    "some_col": [
      [1, 2, 3],
      [4, 5],
    ]
  }
)
t = ibis.memtable(d)

t.some_col.length()  # ■ Cannot access attribute "length" for class "Column"

What version of ibis are you using?

9.5.0

What backend(s) are you using, if any?

DuckDB

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

choucavalier avatar Jan 02 '25 13:01 choucavalier