-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/singlestore integration tests #12
Feature/singlestore integration tests #12
Conversation
9ea059b
to
e79e6e9
Compare
5a8ad0e
to
fced943
Compare
integration-tests/tests/singlestore/singlestore-prefixed.test.ts
Outdated
Show resolved
Hide resolved
integration-tests/tests/singlestore/singlestore-prefixed.test.ts
Outdated
Show resolved
Hide resolved
b1b7672
to
1f47600
Compare
14712f6
to
a5f5f71
Compare
@apeng-singlestore @mitchwadair @tiagoacastro @drodrigues4 is ready to be reviewed |
Cool, I'll take a look soon 👍 |
Notable Changes
Known Issues:
|
Thank you @apeng-singlestore. I updated the PR's description with your notable changes/known issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM, just a few comments. Very exciting!
I also updated the main PR description with @apeng-singlestore's notes |
"name" | ||
], | ||
"isUnique": true, | ||
"using": "btree" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should be here after removing using
method
e4c786a
to
9f50061
Compare
9f50061
to
bab7f4a
Compare
* created singlestore-proxy from mysql-proxy * singlestore integration tests * Added singlestore docker image to integration tests * singlestore custom integration tests pass * fix most of singlestore.test.ts integration tests * rewrite init.sql for each docker container * fix 'having' singlstore-prefixed.test.ts integration tests * removed nested transaction tests * changed timestamps precision to 6 and other minor IT tests fixes * fixed "set operations (union) from query builder with subquery" test * lint * fix "'set operations (union all) from query builder'" test * fix union all and intersect as function tests * fix set operations (intersect) from query builder and as function tests * Remove intersect all tests 'INTERSECT ALL' is not supported by SingleStore * Fix except tests * Removed additional intersectall tests * Fixed mixed and mixed all tests * remove .only * timestamp timezone test fix * fix select from subquery sql it test * Remove new column types (#11) * rm new columns, will add back in alter PR * rm bson, index references * Remove new column types (#11) * rm new columns, will add back in alter PR * rm bson, index references * Fix timestamp timezone test * fix build query insert with onDuplicate * fix UTC config for datetime: remove datetime as string as it is unsupported * fixed onupdate tests need to find exact match on update as singlestore doesn't guarantee order * Fixed returningid test batch insert autoincrements serial columns in singlestore, so updated test code to reflect that * remove .only * Fixed flaky mixed all test Added two possible outputs because order is not guaranteed * removed except all tests * Removed additional exceptall tests * Readded sqlite except tests * fix linting * remove unnecessary 'desc' import * Cleaned up logic for mixed all test * Fixed docker container flakiness * remove .only * created singlestore-proxy from mysql-proxy * singlestore integration tests * Added singlestore docker image to integration tests * singlestore custom integration tests pass * fix most of singlestore.test.ts integration tests * rewrite init.sql for each docker container * fix 'having' singlstore-prefixed.test.ts integration tests * fixed "set operations (union) from query builder with subquery" test * changed timestamps precision to 6 and other minor IT tests fixes * lint * fix "'set operations (union all) from query builder'" test * fix union all and intersect as function tests * fix set operations (intersect) from query builder and as function tests * Fix except tests * removed nested transaction tests * Fixed mixed and mixed all tests * remove .only * timestamp timezone test fix * fix select from subquery sql it test * Remove intersect all tests 'INTERSECT ALL' is not supported by SingleStore * Removed additional intersectall tests * Fix timestamp timezone test * fix build query insert with onDuplicate * fix UTC config for datetime: remove datetime as string as it is unsupported * fixed onupdate tests need to find exact match on update as singlestore doesn't guarantee order * Fixed returningid test batch insert autoincrements serial columns in singlestore, so updated test code to reflect that * remove .only * Fixed flaky mixed all test Added two possible outputs because order is not guaranteed * removed except all tests * Removed additional exceptall tests * Readded sqlite except tests * fix linting * remove unnecessary 'desc' import * Cleaned up logic for mixed all test * Fixed docker container flakiness * remove .only * removed transaction isolationlevel tests as singlestore only has one isolationlevel: https://docs.singlestore.com/cloud/getting-started-with-singlestore-helios/about-singlestore-helios/singlestore-helios-faqs/durability/ * removed transaction isolationlevel tests as singlestore only has one isolationlevel: https://docs.singlestore.com/cloud/getting-started-with-singlestore-helios/about-singlestore-helios/singlestore-helios-faqs/durability/ * fix linting * removed isolation level since S2 only supports READ COMMITTED isolation level * rm mode * SingleStore2 -> SingleStoreDriver * fix tsc * rm unused dialect func * lint fix * fix type test * fix integration tests * update brocli version * Added singlestore docker image to integration tests * singlestore custom integration tests pass * merge all commits * create singlestore replicas tests * change mysql protocol to singlestore on integration tests connection string remove .only * Delete test-docker.js * Delete init.sql * Removed comment * removed singlestoreproxy references * new singlestore relational and duplicated IT tests * add planetscale mode to allow for tests with schema * Removed + skipped unsupported tests Nested Scalar Subselects in Project List: "The query cannot be executed. SingleStore does not support this type of query: nested scalar subselects in project list." Subselect in Aggregate Functions (duplicates.test and test): "Feature 'Subselect in aggregate functions' is not supported by SingleStore. Near '(select json_agg(JSON_BUILD_OBJECT(...)) at line 1, character ...'." * Updated remaining non-skipped tests to be order agnostic * fixed two additional tests to be order agnostic * skipping not supported relational it tests * skipped unsupported tests * remove 'mode' from relational it tests * Delete skip-failing-tests.js --------- Co-authored-by: apeng-singlestore <[email protected]> Co-authored-by: Mitchell Adair <[email protected]> Co-authored-by: Mitchell Adair <[email protected]> Co-authored-by: Alex Blokh <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Removed the generated files from the integration-tests/tests/prisma
directory since they no longer exist in the Drizzle official repository
LGTM! |
Integration Tests
Copied and renamed every mysql reference to singlestore on integration-tests directory
Key differences between MySQL vs SIngleStore IT Tests
serial
column type only assures uniqueness of the column values. The tests were modified to (set operation tests in particular) to expect SingleStore-specific behavior, by adding anORDER BY
instruction to every select instruction.ORDER BY
andLIMIT
cannot be chained together.intersectAll
andexceptAll
tests since these operations are not supported by SIngleStoreisolationLevel
config and tests as singlestore only supports oneisolationLevel
Side notes
There are some SingleStore-specific operations, such as
attach/detach
,create/drop milestone
andoptimyzeTable for column stores tables
, that are implemented ondrizzle-orm/src/singlestore-core
but not ondrizzle-kit
. There are also no integration tests for these operations. This is a known issue and should be fixed in the upcoming releases.The relational tests that included nested selects with aggregations functions were skipped since SingleStore doesn't support it