`col_summary_tbl()` raises a bare `AssertionError` when no column has a supported type
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- data, testing-qa
Research direction
Start with the bare assert self.column_profiles in as_dataframe() in scan_profile.py (around line 270), then look at the is_illegal and NotImplementedError skip checks in datascan.py. Run the reproducer with a Decimal-only or time-only polars frame and confirm the AssertionError. Done means either a clear error that names the skipped column types, or a summary that lists unsupported columns, with the mixed-type case also reporting them. The issue leaves the choice between those two open, so confirm which one to implement with the maintainers first.
Written by the indexing model from the issue text.
Description
Description
col_summary_tbl() raises an AssertionError with no message when none of the table's columns has a type it can profile, for example a table of only Decimal or Time columns, or a pandas object column holding booleans and None.
Minimal reproducible example
import datetime
import decimal
import pandas as pd
import polars as pl
import pointblank as pb
pb.col_summary_tbl(pl.DataFrame({"amount": [decimal.Decimal("1.50"), decimal.Decimal("2.25")]}))
File ".../pointblank/scan_profile.py", line 270, in as_dataframe
assert self.column_profiles
AssertionError
The same happens with:
pb.col_summary_tbl(pl.DataFrame({"t": [datetime.time(9, 0), datetime.time(10, 30)]}))
pb.col_summary_tbl(pd.DataFrame({"flag": [True, None, False]})) # object dtype
pb.col_summary_tbl(
pl.DataFrame({"amount": [decimal.Decimal("1.5")], "t": [datetime.time(9, 0)]})
)
Expected
Either an error that says no column could be summarized and which types were skipped, or a summary table that lists those columns as unsupported.
Actual
A bare AssertionError from _DataProfile.as_dataframe(). DataScan skips columns whose type _TypeMap cannot profile (datascan.py, the is_illegal / NotImplementedError checks), so when every column is skipped column_profiles is empty and the internal assertion fails.
When only some columns are unsupported the report renders, but those columns are left out with no note. For pl.DataFrame({"amount": [decimal.Decimal("1.50")], "n": [1]}), the summary shows only n. Fixing the error case the second way would cover this too.
Environment
- pointblank main (6412f6f8)
- Python 3.12.13, polars 2.0.0, pandas 2.3.3
- macOS (arm64)
- Dominant language
- Python
- Stars
- 494
- Forks
- 38
- Avg merge
- 6h 59m
- Merged PRs (30d)
- 33
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from posit-dev/pointblank
-
Type: ★ Enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
posit-dev/pointblank#379 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
posit-dev/pointblank#395 ·
Maintainers usually reply within 1 day
-
Type: ★ Enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
posit-dev/pointblank#394 ·
Maintainers usually reply within 1 day
-
ibis.pyspark col_vals_in_set produces invalid SQLMay be free again @rich-iannone claimed this 299 days ago, and no pull request is open. OpenDifficulty: [2] Intermediate Effort: [3] High Priority: [3] High Type: ☹︎ Bug
posit-dev/pointblank#335 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
YAML value column selectorMay be free again @rich-iannone claimed this 318 days ago, and no pull request is open. OpenDifficulty: [2] Intermediate Effort: [3] High Priority: [3] High Type: ☹︎ Bug
posit-dev/pointblank#333 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
All issues in posit-dev/pointblank
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
collective/icalendar#1968 · 1 comment ·
Maintainers usually reply within 1 day
-
Deferred from #1869: Complete the companion pytest guardrail update noted in the PR description...Open
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#140958 ·
Maintainers usually reply within 1 day
-
Bug triage/confirmed
Difficulty 2/5 Half a day Newbie friendliness 85/100
agentscope-ai/agentscope#3355 ·
Maintainers usually reply within 2 days