Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$objectToArray,$unwind,$group) finds in the documents the stream reads, grouped by an object keyed on the field name so no collation can mergeEmailwithemail, and a stream whose census cannot run logs the fields it left out.VARCHAR, so MQL export writes its later dates, ObjectIds and decimals as plain strings. Root cause: the same 200-document sample fixes each column's type, so a sampled column that held only nulls now takes the type the census found.Tests
MongoStreamProjectionTests/censusFieldJoinsTheHeader: 200 sampled documents withoutlateand a census reportinglateas a date give alatecolumn typedTIMESTAMPand a non-null cell for document 201. Fails without the fix (columns["_id", "name"]).MongoStreamProjectionTests/censusFieldsFollowTheSampledColumns,censusFieldTakesTheMajorityType,censusTypesAColumnTheSampleHeldOnlyNullsIn: census field order, majority typing with nulls not voting, and a sampled all-null column typed by the census. Each fails without the fix.MongoStreamProjectionTests/fieldsOutsideTheHeaderAreReported,fallbackHeaderAnnouncesOnlyTheId: the fields a header left out are reported. They do not compile without the fix.MongoFieldCensusTests/fieldNamesAreGroupedAsObjectKeys,groupRepliesBecomeTallies,missingExampleIsNull: fields are grouped by an object keyed on the field name and read back from the group'sname. All three fail with a{name, type}group key. Checked on MongoDB 5.0, 6.0, 7 and 8.2: under a collection collation of{locale: "en", strength: 2}and a statement collation of{locale: "en", strength: 1, alternate: "shifted"}, a{name, type}key returns one group forEmail/emailand forfirst_name/firstname, and the object key returns both names.MongoFieldCensusTests(the other cases): the census covers the documents the stream reads (a find's filter, paging, row ceiling and projection; an aggregation's own output; no census for$outor$merge) and keeps the statement'shint,collationandmaxTimeMS.MongoStreamProjectionTests/missingCensusKeepsTheSampledColumns,censusLeavesSampledTypesAlone: without a census the header and its types are unchanged.MongoStreamProjectionTests,MongoFieldCensusTests,BsonDocumentFlattenerTests,BsonFieldPathArrayTests,BsonFieldPathTests,MongoDBCollectionSchemaTests,MongoDBNestedValueWriteTests,MongoScriptCommandBuilderTests,MongoScriptCursorOptionsTests,MongoScriptJsonTests.Docs
The docs rewrite branch covers the user-facing text.
CI fixes
The Package Tests job failed in
SyncRecordMapperTests.unknownWireValueFailsClosed: an unknown Safe Mode value decoded as Off instead of Confirm Writes. The sync mapper now uses the model'sSafeModeLevel(wireValue:isReadOnly:)decoder. Unknown values require confirmation, legacy read-only restrictions remain, and renaming a connection preserves its unknown wire value. Added regression tests for read-only restrictions and renames.Integrated main and fixed another inherited build error:
SurrealValue.text(_:)calledjsonText(length), but main had replaced that helper with a property. Restored the length-aware helper, keepingJSONTruncationfor grid display and full JSON for exports. Existing long-structure export and grid-display tests cover both paths.Follow-up validation on the final merged branch:
swift test --package-path Packages/TableProCore: PASS, all Swift Testing and XCTest runs passed.SurrealDBDriverTests.swiftsuites, and the host's TableFilter model where needed. It adapts imports for the separate test module; it does not run the app's Xcode test host.git diff --check: PASS.verify.sh plugins(AllPlugins): PASS on the merged fix(plugin-surrealdb): BETWEEN, REGEX and IS EMPTY filters become equality checks #3218 branch, including the common SurrealDB helper fix.