Skip to content

Commit

Permalink
Use | for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Nov 4, 2024
1 parent 9d18e59 commit a813fe1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
14 changes: 7 additions & 7 deletions datafusion/sqllogictest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,21 @@ Andrew
```

To test trailing whitespace, project additional non-whitespace column on the
right. For example, by selecting `'XX'` after the column of interest, the test
right. For example, by selecting `'|'` after the column of interest, the test
can distinguish between `Andrew` and `Andrew `:

```text
# Note two spaces between `Andrew` and `XX`
# Note two spaces between `Andrew` and `|`
query TT
select substr('Andrew Lamb', 1, 7), 'XX';
select substr('Andrew Lamb', 1, 7), '|'
----
Andrew XX
Andrew |
# Note only one space between `Andrew` and `XX`
# Note only one space between `Andrew` and `|`
query TT
select substr('Andrew Lamb', 1, 6), 'XX';
select substr('Andrew Lamb', 1, 6), '|'
----
Andrew XX
Andrew |
```

# Reference
Expand Down
12 changes: 8 additions & 4 deletions datafusion/sqllogictest/test_files/functions.slt
Original file line number Diff line number Diff line change
Expand Up @@ -738,17 +738,21 @@ true


## Demonstrate how to test for trailing whitespace

# Note no trailing whitespace
query T
select substr('Andrew Lamb', 1, 7)
----
Andrew

# Note two spaces between `Andrew` and `|`
query TT
select substr('Andrew Lamb', 1, 7), 'XX'
select substr('Andrew Lamb', 1, 7), '|'
----
Andrew XX
Andrew |

# Note only one space between `Andrew` and `|`
query TT
select substr('Andrew Lamb', 1, 6), 'XX'
select substr('Andrew Lamb', 1, 6), '|'
----
Andrew XX
Andrew |

0 comments on commit a813fe1

Please sign in to comment.