Skip to content

Commit 58d4f8e

Browse files
authored
fix(ci): flaky test (#17149)
* fix flaky test * fix fix
1 parent 0984b3f commit 58d4f8e

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

scripts/build/build-website.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ cd "$SCRIPT_PATH/../.." || exit
1010
echo "Building docs"
1111
cd website
1212

13-
# NOET: for aarch64 macos
13+
# NOTE: for aarch64 macos
1414
# arch -x86_64 zsh
1515

1616
mkdir -p ~/.nvm

src/query/ast/src/parser/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ where
518518
input.backtrace.clear();
519519

520520
let err_kind = match err {
521-
PrattError::EmptyInput => ErrorKind::Other("expecting an oprand"),
521+
PrattError::EmptyInput => ErrorKind::Other("expecting an operand"),
522522
PrattError::UnexpectedNilfix(_) => ErrorKind::Other("unable to parse the element"),
523523
PrattError::UnexpectedPrefix(_) => {
524524
ErrorKind::Other("unable to parse the prefix operator")

src/query/ast/tests/it/testdata/expr-error.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ error:
55
--> SQL:1:3
66
|
77
1 | 5 * (a and ) 1
8-
| - ^ expecting an oprand
8+
| - ^ expecting an operand
99
| |
1010
| while parsing expression
1111

@@ -17,7 +17,7 @@ error:
1717
--> SQL:1:5
1818
|
1919
1 | a + +
20-
| - ^ expecting an oprand
20+
| - ^ expecting an operand
2121
| |
2222
| while parsing expression
2323

src/query/ast/tests/it/testdata/query-error.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ error:
55
--> SQL:1:24
66
|
77
1 | select * from customer join where a = b
8-
| ------ ^^^^ expecting an oprand
8+
| ------ ^^^^ expecting an operand
99
| |
1010
| while parsing `SELECT ...`
1111

src/query/script/src/compiler.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,14 +724,14 @@ impl Compiler {
724724
fn compile_case(
725725
&mut self,
726726
span: Span,
727-
oprand: &Expr,
727+
operand: &Expr,
728728
conditions: &[Expr],
729729
results: &[Vec<ScriptStatement>],
730730
else_result: &Option<Vec<ScriptStatement>>,
731731
) -> Result<Vec<ScriptIR>> {
732732
let conditions = conditions
733733
.iter()
734-
.map(|condition| wrap_eq(condition.span(), oprand.clone(), condition.clone()))
734+
.map(|condition| wrap_eq(condition.span(), operand.clone(), condition.clone()))
735735
.collect::<Vec<_>>();
736736
self.compile_if(span, &conditions, results, else_result)
737737
}

src/query/sql/src/planner/binder/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ impl TableIdentifier {
186186
QuotedIdent(&database.name, self.dialect.default_ident_quote())
187187
)
188188
}
189-
Some(NameResolutionSuggest::Unqoted) => {
189+
Some(NameResolutionSuggest::Unquoted) => {
190190
format!(
191191
"Unknown database {catalog}.{database} (quoted). Did you mean {} (unquoted)?",
192192
&database.name
@@ -204,7 +204,7 @@ impl TableIdentifier {
204204
QuotedIdent(&table.name, self.dialect.default_ident_quote())
205205
)
206206
}
207-
Some(NameResolutionSuggest::Unqoted) => {
207+
Some(NameResolutionSuggest::Unquoted) => {
208208
format!(
209209
"Unknown table {catalog}.{database}.{table} (quoted). Did you mean {} (unquoted)?",
210210
&table.name

src/query/sql/src/planner/semantic/name_resolution.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub struct NameResolutionContext {
3333

3434
pub enum NameResolutionSuggest {
3535
Quoted,
36-
Unqoted,
36+
Unquoted,
3737
}
3838

3939
impl NameResolutionContext {
@@ -48,7 +48,7 @@ impl NameResolutionContext {
4848
) {
4949
(false, true, false) => Some(NameResolutionSuggest::Quoted),
5050
(true, false, true) if !ident_needs_quote(&ident.name) => {
51-
Some(NameResolutionSuggest::Unqoted)
51+
Some(NameResolutionSuggest::Unquoted)
5252
}
5353
_ => None,
5454
}

tests/sqllogictests/suites/query/functions/02_0012_function_datetimes_tz.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ query T
885885
SELECT substr(DATE_ADD(month, 1, now())::String, 6, 2) =
886886
CASE
887887
WHEN substr(now()::String, 6, 2) = '12' THEN '01'
888-
ELSE (substr(now()::String, 6, 2)::int + 1)::String
888+
ELSE LPAD((substr(now()::String, 6, 2)::int + 1)::String, 2, '0')
889889
END;
890890
----
891891
1
@@ -950,7 +950,7 @@ query T
950950
SELECT substr(DATE_ADD(month, 1, now())::String, 6, 2) =
951951
CASE
952952
WHEN substr(now()::String, 6, 2) = '12' THEN '01'
953-
ELSE (substr(now()::String, 6, 2)::int + 1)::String
953+
ELSE LPAD((substr(now()::String, 6, 2)::int + 1)::String, 2, '0')
954954
END;
955955
----
956956
1
@@ -960,7 +960,7 @@ query T
960960
SELECT substr(DATE_ADD(month, 1, now())::String, 1, 4) =
961961
CASE
962962
WHEN substr(now()::String, 6, 2) = '12' THEN (substr(now()::String, 1,4)::int+1)::String
963-
ELSE (substr(now()::String, 6, 2)::int + 1)::String
963+
ELSE (substr(now()::String, 1, 4)::int)::String
964964
END;
965965
----
966966
1

tests/sqllogictests/suites/query/functions/02_0075_function_datetimes_tz.test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ query T
759759
SELECT substr(DATE_ADD(month, 1, now())::String, 6, 2) =
760760
CASE
761761
WHEN substr(now()::String, 6, 2) = '12' THEN '01'
762-
ELSE (substr(now()::String, 6, 2)::int + 1)::String
762+
ELSE LPAD((substr(now()::String, 6, 2)::int + 1)::String, 2, '0')
763763
END;
764764
----
765765
1
@@ -769,7 +769,7 @@ query T
769769
SELECT substr(DATE_ADD(month, 1, now())::String, 1, 4) =
770770
CASE
771771
WHEN substr(now()::String, 6, 2) = '12' THEN (substr(now()::String, 1,4)::int+1)::String
772-
ELSE (substr(now()::String, 6, 2)::int + 1)::String
772+
ELSE (substr(now()::String, 1, 4)::int)::String
773773
END;
774774
----
775775
1
@@ -813,7 +813,7 @@ query T
813813
SELECT substr(DATE_ADD(month, 1, now())::String, 6, 2) =
814814
CASE
815815
WHEN substr(now()::String, 6, 2) = '12' THEN '01'
816-
ELSE (substr(now()::String, 6, 2)::int + 1)::String
816+
ELSE LPAD((substr(now()::String, 6, 2)::int + 1)::String, 2, '0')
817817
END;
818818
----
819819
1
@@ -823,7 +823,7 @@ query T
823823
SELECT substr(DATE_ADD(month, 1, now())::String, 1, 4) =
824824
CASE
825825
WHEN substr(now()::String, 6, 2) = '12' THEN (substr(now()::String, 1,4)::int+1)::String
826-
ELSE (substr(now()::String, 6, 2)::int + 1)::String
826+
ELSE (substr(now()::String, 1, 4)::int)::String
827827
END;
828828
----
829829
1

0 commit comments

Comments
 (0)