This repository was archived by the owner on May 17, 2024. It is now read-only.
tests: fix presto, add faker classes - #106
Merged
Merged
Conversation
sirupsen
commented
Jun 24, 2022
| name = name.replace(r"without time zone", "n_tz") | ||
| name = name.replace(r"with time zone", "y_tz") | ||
| name = name.replace(r"with local time zone", "y_tz") | ||
| name = name.replace(r"timestamp", "ts") |
Contributor
Author
There was a problem hiding this comment.
I prefer shortening and never truncating names. That could lead to some nasty, nasty bugs down the line.
erezsh
suggested changes
Jun 25, 2022
|
|
||
| level = logging.ERROR | ||
| if os.environ.get('DEBUG', False): | ||
| level = logging.DEBUG |
Contributor
There was a problem hiding this comment.
It would be more flexible to get the LOG_LEVEL and use getattr with it.
| import math | ||
| import datetime | ||
| from decimal import Decimal | ||
| from prestodb.exceptions import PrestoUserError |
Contributor
There was a problem hiding this comment.
I think we should avoid this kind of imports.
Instead you can use import_presto() from databases/presto.py where it's needed.
If that's too clumsy, we can store "prestodb" in the Presto insntance, and use it as db.prestodb.exceptions.PrestoUserError.
| name = name.replace(r"without time zone", "n_tz") | ||
| name = name.replace(r"with time zone", "y_tz") | ||
| name = name.replace(r"with local time zone", "y_tz") | ||
| name = name.replace(r"timestamp", "ts") |
Contributor
|
Nice one! |
sirupsen
force-pushed
the
presto-and-fakers
branch
3 times, most recently
from
June 27, 2022 15:35
2d70092 to
6bcf104
Compare
erezsh
approved these changes
Jun 27, 2022
sirupsen
force-pushed
the
presto-and-fakers
branch
from
June 27, 2022 15:37
6bcf104 to
5a173fd
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First set of changes to allow the test suites to be used for benchmarking:
*Fakerclasses that are capable of producing an infinite amount of rows for benchmarkingJust trying to split this up so it's easier to review