-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: better support and testing for FmtExport #44322
Comments
Is |
Just a flag. |
Part of cockroachdb#44322. To ensure better testing of the roundtripping of datums through `FmtExport` and `ParseDatumStringAs` this PR adds another test that runs random datums through this path. Release note: None
@mjibson, why do we need to support |
Part of work for cockroachdb#44322. Fixes cockroachdb#33429. Release note (enterprise change): This PR fixes a bug where export/import could not round trip arrays correctly.
I'm looking at this more, and I'm concerned if For example, Most of the various escaping done in |
Part of work for cockroachdb#44322. Fixes cockroachdb#33429. Release note (enterprise change): This PR fixes a bug where export/import could not round trip arrays correctly.
TODO (rohany): add a test that tests round tripping of arrays of all scalar types, or update the existing test to do so. |
Part of cockroachdb#44322. To ensure better testing of the roundtripping of datums through `FmtExport` and `ParseDatumStringAs` this PR adds another test that runs random datums through this path. Release note: None
44390: sqlbase: add randomized testing of ParseDatumStringAs r=mjibson a=rohany Part of #44322. To ensure better testing of the roundtripping of datums through `FmtExport` and `ParseDatumStringAs` this PR adds another test that runs random datums through this path. Release note: None Co-authored-by: Rohan Yadav <[email protected]>
This PR extends randInterestingDatums to include at least one interesting datum for all scalar types to ensure that edge cases don't break things. Additionally, this PR adds a panic to randInterestingDatums if an interesting datum for a type could not be found, so that we continue to have coverage for all of our types. Part of work for cockroachdb#44322. Release note: None
This PR extends randInterestingDatums to include at least one interesting datum for all scalar types to ensure that edge cases don't break things. Additionally, this PR adds a panic to randInterestingDatums if an interesting datum for a type could not be found, so that we continue to have coverage for all of our types. Part of work for cockroachdb#44322. Release note: None
Work for cockroachdb#44322. This PR adds support for ARRAY's to be dumped with the `tree.FmtExport` flag, which dumps datums in a string format that can be round-tripped with `sqlbase.ParseDatumStringAs`. Release note: None
Part of work for cockroachdb#44322. This PR adds a testing utility to generate a table full of edge case datums to test a variety of things in the future. Release note: None
This PR extends randInterestingDatums to include at least one interesting datum for all scalar types to ensure that edge cases don't break things. Additionally, this PR adds a panic to randInterestingDatums if an interesting datum for a type could not be found, so that we continue to have coverage for all of our types. Part of work for cockroachdb#44322. Release note: None
Part of work for cockroachdb#44322. This PR adds a testing utility to generate a table full of edge case datums to test a variety of things in the future. Release note: None
44459: sqlbase: add interesting datums for all scalar types r=rohany a=rohany This PR extends randInterestingDatums to include at least one interesting datum for all scalar types to ensure that edge cases don't break things. Additionally, this PR adds a panic to randInterestingDatums if an interesting datum for a type could not be found, so that we continue to have coverage for all of our types. Part of work for #44322. Release note: None Co-authored-by: Rohan Yadav <[email protected]>
44078: ui: Tests on react-routing components r=dhartunian a=Koorosh Depends on PR: #43846 `yarn-vendor` PR has to be merged: cockroachdb/yarn-vendored#15 Current PR includes minimal changes to functionality (only those which are required to isolate or get access to individual components under tests): - `src/index.tsx` file has been refactored into two parts: rendering to DOM and independent `App` component; - <Helmet> component (`react-helmet` library) has been refactored to avoid known issue during tests execution (nfl/react-helmet#373) - old version of react-router and `connect` component in tandem do not work well because connected component aren't valid react components. As result validation for correct routing was done by re-exporting wrapped components (instead of connected). It allowed to simplify testing with `enzyme#find` function which requires valid react component as an argument; - Tests are grouped in suites per route to maintain related tests per route; - There is two kinds of tests which test correct rendering of component for specific test and another test which validates correct redirection for routes; - Tests can be refactored to be constructed from configuration to reduce repeated tests, but it will be actual after migrating to latest version of react-router lib. 44545: sqlbase: add table generator for edge case datums r=rohany a=rohany Part of work for #44322. This PR adds a testing utility to generate a table full of edge case datums to test a variety of things in the future. Release note: None Co-authored-by: Andrii Vorobiov <[email protected]> Co-authored-by: Rohan Yadav <[email protected]>
Work for cockroachdb#44322. This PR adds support for ARRAY's to be dumped with the `tree.FmtExport` flag, which dumps datums in a string format that can be round-tripped with `sqlbase.ParseDatumStringAs`. This PR additionally performs some code cleanup and renaming around various parsing functions within the `tree` package. Release note: None
Work for cockroachdb#44322. This PR adds support for ARRAY's to be dumped with the `tree.FmtExport` flag, which dumps datums in a string format that can be round-tripped with `sqlbase.ParseDatumStringAs`. This PR additionally performs some code cleanup and renaming around various parsing functions within the `tree` package. Release note: None
…ed strings Work for cockroachdb#44322. Fixes cockroachdb#33429. Fixes cockroachdb#44414. Closes cockroachdb#44669. This PR adds support for ARRAY's and collated strings to be dumped with the `tree.FmtExport` flag, which dumps datums in a string format that can be round-tripped with `sqlbase.ParseDatumStringAs`. This PR additionally performs some code cleanup and renaming around various parsing functions within the `tree` package. In particular, this PR removes the function `tree.ParseStringAs` which was confusingly used sometimes instead of `sqlbase.ParseDatumStringAs` due to it's handling of raw bytes. Instead, we introduce a new function `sqlbase.ParseDatumStringAsWithRawBytes` to be more explicit about when to use one parsing function over the other. Release note (bug fix): This PR fixes bugs around `cockroach dump` and `IMPORT`/`EXPORT` where columns of arrays or collated strings were not able to be roundtripped from cockroach to the dump and back to cockroach.
44464: sqlbase: add round-trippable export and parsing for arrays and collated strings r=knz a=rohany Work for #44322. Fixes #33429. Fixes #44414. Closes #44669. This PR adds support for ARRAY's and collated strings to be dumped with the `tree.FmtExport` flag, which dumps datums in a string format that can be round-tripped with `sqlbase.ParseDatumStringAs`. This PR additionally performs some code cleanup and renaming around various parsing functions within the `tree` package. In particular, this PR removes the function `tree.ParseStringAs` which was confusingly used sometimes instead of `sqlbase.ParseDatumStringAs` due to it's handling of raw bytes. Instead, we introduce a new function `sqlbase.ParseDatumStringAsWithRawBytes` to be more explicit about when to use one parsing function over the other. Release note (bug fix): This PR fixes bugs around `cockroach dump` and `IMPORT`/`EXPORT` where columns of arrays or collated strings would not be able to be roundtripped from cockroach to the dump and back to cockroach. Co-authored-by: Rohan Yadav <[email protected]>
This has been completed, with extra testing moved to a new issue. |
tree.FmtExport and ParseDatumStringAs are a pair of functions that are designed to round trip our datums as strings. They are tested at
cockroach/pkg/sql/sem/tree/parse_string_test.go
Line 26 in c16ce06
We need to improve support for them.
cockroach/pkg/sql/sqlbase/testutils.go
Line 364 in c16ce06
cockroach/pkg/sql/sqlbase/testutils.go
Line 527 in c16ce06
Bonus points:
The text was updated successfully, but these errors were encountered: