CodeRabbit Generated Unit Tests: Add unit tests - #1719
Conversation
|
Important Review skippedThis PR was authored by the user configured for CodeRabbit reviews. CodeRabbit does not review PRs authored by this user. It's recommended to use a dedicated user account to post CodeRabbit review feedback. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a513194b96
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| dir := prepareColumnAssetReachabilityCommandWALDirM15A(t) | ||
| d := openCollectionCommandWALDB(t, dir) | ||
| defer func() { _ = d.Close() }() | ||
| col := openColumnStoreCollectionM10B(t, d) |
There was a problem hiding this comment.
Remove unresolved helper calls from rewrite tests
This test file introduces references to symbols that are not defined anywhere in the collections package (for example openColumnStoreCollectionM10B, prepareColumnAssetReachabilityCommandWALDirM15A, and columnAssetM12ASegmentFileID only appear in this new file), so the test package cannot compile when go test reaches type-checking. That blocks CI for the whole TreeDB/collections package rather than validating rewrite behavior.
Useful? React with 👍 / 👎.
| {current: 16, required: 16, wantMin: 16}, | ||
| } | ||
| for _, tc := range cases { | ||
| got := columnDictionaryInt64GroupNextScratchCap(tc.current, tc.required) |
There was a problem hiding this comment.
Replace undefined int64 query helper references
These tests call identifiers that are not implemented in non-test code (e.g. columnDictionaryInt64GroupNextScratchCap / columnDictionaryInt64GroupMaxGroups only occur in this test file), which means the package test binary cannot be built. As written, this change introduces compile-time failures instead of additional coverage.
Useful? React with 👍 / 👎.
| // Tests for columnDictionaryCodeDistinctSeenWords (new utility function in column_dictionary_query.go). | ||
|
|
||
| func TestColumnDictionaryCodeDistinctSeenWordsZeroGroupsM1634(t *testing.T) { | ||
| wordsPerGroup, totalWords, ok, err := columnDictionaryCodeDistinctSeenWords(0, 10) |
There was a problem hiding this comment.
Point dictionary query tests at existing APIs
The new dictionary-query tests are wired to missing internals (columnDictionaryCodeDistinctSeenWords and related helpers are referenced here but have no definitions in the package), so go test cannot compile this file. This turns the test addition into a package-wide test build break.
Useful? React with 👍 / 👎.
| Options: CollectionOptions{ColumnStore: nil}, | ||
| } | ||
| def := IndexDefinition{Field: "email"} | ||
| if err := rejectCreateIndexOnRetainedColumnField(meta, def); err != nil { |
There was a problem hiding this comment.
Drop non-existent column-store API symbols in tests
This test suite depends on unimplemented symbols such as rejectCreateIndexOnRetainedColumnField, preparedBatchUpdatePrimaryDocument, and ErrColumnAssetReachabilityIncomplete, which are only referenced in this test file and are absent from package code. The result is a compile failure for TreeDB/collections tests instead of runnable unit coverage.
Useful? React with 👍 / 👎.
Unit test generation was requested by @snissn.
The following files were modified:
TreeDB/collections/column_asset_rewrite_test.goTreeDB/collections/column_dict_int64_query_test.goTreeDB/collections/column_dictionary_query_test.goTreeDB/collections/column_store_api_test.go