Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…o-contracts-support
| # It could be that the datasource has synonyms for the data types, and we want to handle that in the mappings. | ||
| # For an example: see the postgres implementation. We basically create a list of lists. Whereby each sublist contains the synonyms for a given SodaDataTypeName. | ||
| return [] | ||
|
|
There was a problem hiding this comment.
Removed during cleanup by Claude, unused
| .column_varchar("id2", 100) | ||
| .column_integer("my_value") | ||
| .column_timestamp("my_timestamp") | ||
| .column_timestamp("my_timestamp", datetime_precision=6) |
There was a problem hiding this comment.
Claude fix, unsure about this one
There was a problem hiding this comment.
Generated by Claude, reviewed very lightly
m1n0
left a comment
There was a problem hiding this comment.
LGTM, thanks for all the types investigation and testing on two different flavors!
Could you perhaps document (e.g. comments in code?) the flow of "can create (mat)views?" - the logic of when we call the actual "try to do it" instead of relying on a default is super easy to graps when approaching it from datasource (as opposed to approaching it from test suite) - and it might be useful for posterity
|
|
||
| project_root_dir = __file__[: -len("/soda-core/tests/helpers/test_fixtures.py")] | ||
| load_dotenv(f"{project_root_dir}/.env", override=True) | ||
| project_root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..")) |
There was a problem hiding this comment.
out of curiosity - is this so that directory name other than soda-core works?
There was a problem hiding this comment.
Yes but also this path was actually wrong, file is soda-tests/src/helpers/test_fixtures.py, we've been relying on environment being loaded in the shell all this time. Claude choked on it and suggested this fix
soda-tests/tests/feature/conftest.py
Outdated
| _datasource = os.environ.get("TEST_DATASOURCE", "postgres") | ||
|
|
||
|
|
||
| def pytest_collection_modifyitems(config, items): |
There was a problem hiding this comment.
hmm I get the motivation to prevent confusing local failures, but shouldn't we then stop running tests conditionally for datasources by pointing them at directories and use this mechanism instead? Now we have two completely separate ways to control this
There was a problem hiding this comment.
I'll take this out for now
|



Description
Add support for Trino.
db(postgres) andiceberg(s3). We're testing on bothsoda-trino/local_instance/README.mdsmallintbecomesint,varchar(255)becomesvarcharetc.Checklist