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

Separate parent & reader in Dataset / Set Class(es) #122

Open
mdr223 opened this issue Feb 12, 2025 · 0 comments
Open

Separate parent & reader in Dataset / Set Class(es) #122

mdr223 opened this issue Feb 12, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@mdr223
Copy link
Collaborator

mdr223 commented Feb 12, 2025

From Siva's feedback on #103:

I am not a big fan of how this is implemented now. Maybe, we can fix this in a later PR. But I think we should distinguish between a parent and a reader.

A dataset should have a member reader. This constructor should take in an argument reader: str | Path | list | pd.DataFrame | DataReader and set the reader member.

Constructor of the class Set should take an argument parent which should be of type Set | None. It should be set to None here (the first dataset in a query dag).

This is cleaner and you can avoid some of the isinstance(node/source, Datareader) calls here and in your optimizer.

@mdr223 mdr223 added the enhancement New feature or request label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant