tests: Add newline handling to slt when multiline is not specified#31930
Merged
ggevay merged 3 commits intoMaterializeInc:mainfrom Mar 19, 2025
Merged
tests: Add newline handling to slt when multiline is not specified#31930ggevay merged 3 commits intoMaterializeInc:mainfrom
multiline is not specified#31930ggevay merged 3 commits intoMaterializeInc:mainfrom
Conversation
def-
approved these changes
Mar 17, 2025
Contributor
def-
left a comment
There was a problem hiding this comment.
The first commit changes the CODEOWNERS of /src/sqllogictest from @MaterializeInc/adapter to @MaterializeInc/testing. (But let me know if there was a good reason to have the Adapter team be the owner.)
Generally we haven't written many SLT tests in the testing team, and more focused on higher level frameworks. It still makes sense to review test changes though.
Newlines are represented as a ⏎ character in the result specification.
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.
The first commit changes the CODEOWNERS of
/src/sqllogictestfrom@MaterializeInc/adapterto@MaterializeInc/testing. (But let me know if there was a good reason to have the Adapter team be the owner.) Edit: Also added myself, as discussed in DMs.The second commit fixes a minor bug in space handling in slt in
colnames.The third commit is the main thing, which adds newline handling to slt result values, even when
multilineis not specified. We use the replacement character trick to avoid newlines inside result values conflicting with newlines that are for field or row separation: when rewriting, we replace newlines with ⏎; when parsing, we replace ⏎ with newlines.The motivation is that I'd like to have this feature for my next PR, which will make
SHOW CREATE ...pretty-print its output, adding newlines. We have a gazillion tests that callSHOW CREATE, and it would be painful to change all of them to usemultiline, especially that they have multi-column outputs, which, I think, is not really supported withmultiline.(I've added
lts-backport-v25.1, because theSHOW CREATEPR will need to be backported, becausemzexplorewill rely on that, andmzexploreis part of the self-managed debug tool.)Motivation
Tips for reviewer
Checklist
$T ⇔ Proto$Tmapping (possibly in a backwards-incompatible way), then it is tagged with aT-protolabel.