points by gavinray 17 hours ago | 0 comments
If this actually works, this is such a huge boon. Let me share why:
I work on connectors to various datasources, mostly SQL DB's
The most useful tests are the integration tests, sending actual queries to the source
For most DB's we have a giant Docker Compose which runs a local instance
But things like Snowflake, Databricks, Redshift, Athena suck to test because we need an external hosted instance
I would kill to be able to run test versions of all of these locally
[–] tomnipotent 14 hours ago
For cloud databases, in your use case do you care that the queries actually execute or only that they parse? I with every cloud service had their own version of LocalStack/Moto, and while not perfect they've really helped to improve test coverage.
[–] gavinray 13 hours ago
Unfortunately they have to actually execute and have identical semantics to the target source
I recall seeing a project based on DuckDB parser and engine which emulated dialects for one of these but because the sortinh and other behavior is different it wasn't usable
[–] skeeter2020 15 hours ago
[–] gavinray 14 hours ago
Our connectors receive a generic query IR from a Datafusion-based engine
Each connector is then responsible for faithfully translating the query IR into the semantically equivalent query for the underlying data source
For a SQL DB this would be a SQL query, for MongoDB a JSON predicate query, for csv/json files it would be an in-memory predicate engine, etc
Running the generated query against the target data source and asserting that this doesn't throw an error and that the records returned are both correct and in the right order is the true test
[–] dionian 15 hours ago
[–] viccis 12 hours ago