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

Fault tolerant error handling on invalid Condition() #147

Open
windiana42 opened this issue May 30, 2023 · 1 comment
Open

Fault tolerant error handling on invalid Condition() #147

windiana42 opened this issue May 30, 2023 · 1 comment

Comments

@windiana42
Copy link

One can see it as a user error that Condition(rawstring="col is not NULL") fails if col does not exist in table. However, the general concept of datajudge seems to be to handle errors fault tolerant and to report a list of errors at the end. Thus it might be nice to try-catch also plain query related errors and to report those fault tolerant at the end as well.

It may be a conscious decision to only handle value errors fault tolerant and structural problems fail fast. So feel free to reject this issue. I don't have long user experience with datajudge, yet. I am just helping a team use it.

@kklein
Copy link
Collaborator

kklein commented May 31, 2023

Hi @windiana42 - thanks for raising this issue!

Thus it might be nice to try-catch also plain query related errors and to report those fault tolerant at the end as well.

As of now, If the column referenced in a Condition does not exist in the table at hand, every Constraint relying on it will lead to a test failure, e.g.

FAILED tests/integration/test_data_source.py::test_uniques_subset_between_expression[postgres-data3] - sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column "colz_int" does not exist

What would be your desired behaviour? Merely a more explicit test failure message or some mechanism preventing the test(s) to be run in the first place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants