posit-dev / posit-dev/pointblank

col_summary_tbl() does not accept `ibis.expr.types.relations.Table`

Open
#286 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: ☹︎ Bug
Dominant language
Python
Stars
490
Forks
32
Avg merge
14h 24m
Merged PRs (30d)
2

Description

Prework

Description

Describe the bug clearly and concisely.

Putting an ibis.expr.types.relations.Table object into col_summary_tbl() returns TypeError: Expected pandas-like dataframe, Polars dataframe, or Polars lazyframe, got: <class 'pyarrow.lib.RecordBatchReader'> even though documentation states that Ibis's Table objects should be acceptable. I have checked the type of the input into the function.

Reproducible example

  • Post a minimal reproducible example (MRE) so the maintainer can troubleshoot the problems you identify. A reproducible example is:
    • Runnable: post enough code and data so any onlooker can create the error on their own computer.
    • Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
    • Readable: format your code according to the Style Guide for Python Code.

salesforce_contacts.zip (uncompress this zip file)

import pointblank as pb
import ibis

ibis.options.interactive = True

ibis_database_table_object = ibis.duckdb.connect("salesforce_contacts.duckdb").table("all_contacts")

print(f"ibis_database_table_object's type is: {type(ibis_database_table_object)}")

pb.col_summary_tbl(data=ibis_database_table_object)

Expected result

I would expect to be able to get a summary of the table.

Development environment

  • Operating System: Windows 11
  • pointblank version 0.13.4
  • ibis version 10.8.0

Additional context

Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the provided Ibis and DuckDB reproducible example with pointblank 0.13.4, using col_summary_tbl() as the entry point. Trace how the Ibis Table becomes a pyarrow RecordBatchReader and compare that path with the accepted dataframe inputs; done means the example returns a table summary instead of raising TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.