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

Implement handlers for series literal in cudf-polars #16113

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Raise if an output column would have EMPTY type id
wence- committed Jun 28, 2024

Verified

This commit was signed with the committer’s verified signature.
wence- Lawrence Mitchell
commit 95daeb2d7fc937665a749f206e535a65328a1df9
5 changes: 5 additions & 0 deletions python/cudf_polars/cudf_polars/dsl/ir.py
Original file line number Diff line number Diff line change
@@ -130,6 +130,11 @@ class IR:
schema: Schema
"""Mapping from column names to their data types."""

def __post_init__(self):
"""Validate preconditions."""
if any(dtype.id() == plc.TypeId.EMPTY for dtype in self.schema.values()):
raise NotImplementedError("Cannot make empty columns.")

def evaluate(self, *, cache: MutableMapping[int, DataFrame]) -> DataFrame:
"""
Evaluate the node and return a dataframe.