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

feat: pyspark and duckdb selectors #1853

Merged
merged 10 commits into from
Jan 26, 2025
Merged

Conversation

FBruzzesi
Copy link
Member

What type of PR is this? (check all applicable)

  • πŸ’Ύ Refactor
  • ✨ Feature
  • πŸ› Bug Fix
  • πŸ”§ Optimization
  • πŸ“ Documentation
  • βœ… Test
  • 🐳 Other

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

If you have comments or can explain your changes, please do so below

@@ -96,7 +88,7 @@ def test_set_ops(
expected: list[str],
request: pytest.FixtureRequest,
) -> None:
if ("pyspark" in str(constructor)) or "duckdb" in str(constructor):
if "duckdb" in str(constructor) and not expected:
Copy link
Member Author

@FBruzzesi FBruzzesi Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To figure this out due to:

# TODO(marco): return empty relation with 0 columns?
return self._from_native_frame(self._native_frame.limit(0))

took me some sanity πŸ˜‚

I tried in different ways to create an empty table but duckdb doesn't really like that. Maybe we might just raise an error?

@FBruzzesi FBruzzesi added enhancement New feature or request pyspark Issue is related to pyspark backend duckdb Issue is related to duckdb backend labels Jan 22, 2025
@FBruzzesi FBruzzesi marked this pull request as ready for review January 22, 2025 19:21
dtypes = import_dtypes_module(self._version)
return self.by_dtype(
[
dtypes.Int64,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need dtypes.Int128 in here too now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be added everywhere?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, probably

@MarcoGorelli
Copy link
Member

nice, thanks - i'm just in the middle of a big refactor, so i'll finish that, then i'll update these

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @FBruzzesi !

@MarcoGorelli MarcoGorelli merged commit 364a625 into main Jan 26, 2025
23 of 24 checks passed
@MarcoGorelli MarcoGorelli deleted the feat/pyspark-duckdb-selectors branch January 26, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duckdb Issue is related to duckdb backend enhancement New feature or request pyspark Issue is related to pyspark backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants