Skip to content

Commit

Permalink
trim string before rowsort (#137)
Browse files Browse the repository at this point in the history
Signed-off-by: Runji Wang <wangrunji0408@163.com>

Signed-off-by: Runji Wang <wangrunji0408@163.com>
  • Loading branch information
wangrunji0408 committed Dec 30, 2022
1 parent 879204b commit 693583b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sqllogictest/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,15 @@ impl<D: AsyncDB> Runner<D> {
}
};

// trim strings
for row in &mut rows {
for value in row {
if value.trim() != value {
*value = value.trim().to_string();
}
}
}

match sort_mode.as_ref().or(self.sort_mode.as_ref()) {
None | Some(SortMode::NoSort) => {}
Some(SortMode::RowSort) => {
Expand Down

0 comments on commit 693583b

Please sign in to comment.