diff --git a/scripts/build/build-website.sh b/scripts/build/build-website.sh index e866d56c3d248..43e784bd33757 100755 --- a/scripts/build/build-website.sh +++ b/scripts/build/build-website.sh @@ -10,7 +10,7 @@ cd "$SCRIPT_PATH/../.." || exit echo "Building docs" cd website -# NOET: for aarch64 macos +# NOTE: for aarch64 macos # arch -x86_64 zsh mkdir -p ~/.nvm diff --git a/src/query/ast/src/parser/common.rs b/src/query/ast/src/parser/common.rs index aa1b3ce0ac33a..48bf82389d90d 100644 --- a/src/query/ast/src/parser/common.rs +++ b/src/query/ast/src/parser/common.rs @@ -518,7 +518,7 @@ where input.backtrace.clear(); let err_kind = match err { - PrattError::EmptyInput => ErrorKind::Other("expecting an oprand"), + PrattError::EmptyInput => ErrorKind::Other("expecting an operand"), PrattError::UnexpectedNilfix(_) => ErrorKind::Other("unable to parse the element"), PrattError::UnexpectedPrefix(_) => { ErrorKind::Other("unable to parse the prefix operator") diff --git a/src/query/ast/tests/it/testdata/expr-error.txt b/src/query/ast/tests/it/testdata/expr-error.txt index 4e0216bf983a3..547e74f758c94 100644 --- a/src/query/ast/tests/it/testdata/expr-error.txt +++ b/src/query/ast/tests/it/testdata/expr-error.txt @@ -5,7 +5,7 @@ error: --> SQL:1:3 | 1 | 5 * (a and ) 1 - | - ^ expecting an oprand + | - ^ expecting an operand | | | while parsing expression @@ -17,7 +17,7 @@ error: --> SQL:1:5 | 1 | a + + - | - ^ expecting an oprand + | - ^ expecting an operand | | | while parsing expression diff --git a/src/query/ast/tests/it/testdata/query-error.txt b/src/query/ast/tests/it/testdata/query-error.txt index 387e6f7575289..a47c79410f48e 100644 --- a/src/query/ast/tests/it/testdata/query-error.txt +++ b/src/query/ast/tests/it/testdata/query-error.txt @@ -5,7 +5,7 @@ error: --> SQL:1:24 | 1 | select * from customer join where a = b - | ------ ^^^^ expecting an oprand + | ------ ^^^^ expecting an operand | | | while parsing `SELECT ...` diff --git a/src/query/script/src/compiler.rs b/src/query/script/src/compiler.rs index b1e8f800e0ae0..d697fb37e750b 100644 --- a/src/query/script/src/compiler.rs +++ b/src/query/script/src/compiler.rs @@ -724,14 +724,14 @@ impl Compiler { fn compile_case( &mut self, span: Span, - oprand: &Expr, + operand: &Expr, conditions: &[Expr], results: &[Vec], else_result: &Option>, ) -> Result> { let conditions = conditions .iter() - .map(|condition| wrap_eq(condition.span(), oprand.clone(), condition.clone())) + .map(|condition| wrap_eq(condition.span(), operand.clone(), condition.clone())) .collect::>(); self.compile_if(span, &conditions, results, else_result) } diff --git a/src/query/sql/src/planner/binder/util.rs b/src/query/sql/src/planner/binder/util.rs index e4acdd0ddccf6..fea15e42ca07b 100644 --- a/src/query/sql/src/planner/binder/util.rs +++ b/src/query/sql/src/planner/binder/util.rs @@ -186,7 +186,7 @@ impl TableIdentifier { QuotedIdent(&database.name, self.dialect.default_ident_quote()) ) } - Some(NameResolutionSuggest::Unqoted) => { + Some(NameResolutionSuggest::Unquoted) => { format!( "Unknown database {catalog}.{database} (quoted). Did you mean {} (unquoted)?", &database.name @@ -204,7 +204,7 @@ impl TableIdentifier { QuotedIdent(&table.name, self.dialect.default_ident_quote()) ) } - Some(NameResolutionSuggest::Unqoted) => { + Some(NameResolutionSuggest::Unquoted) => { format!( "Unknown table {catalog}.{database}.{table} (quoted). Did you mean {} (unquoted)?", &table.name diff --git a/src/query/sql/src/planner/semantic/name_resolution.rs b/src/query/sql/src/planner/semantic/name_resolution.rs index 1dced38ab64ca..d18973321f7cd 100644 --- a/src/query/sql/src/planner/semantic/name_resolution.rs +++ b/src/query/sql/src/planner/semantic/name_resolution.rs @@ -33,7 +33,7 @@ pub struct NameResolutionContext { pub enum NameResolutionSuggest { Quoted, - Unqoted, + Unquoted, } impl NameResolutionContext { @@ -48,7 +48,7 @@ impl NameResolutionContext { ) { (false, true, false) => Some(NameResolutionSuggest::Quoted), (true, false, true) if !ident_needs_quote(&ident.name) => { - Some(NameResolutionSuggest::Unqoted) + Some(NameResolutionSuggest::Unquoted) } _ => None, } diff --git a/tests/sqllogictests/suites/query/functions/02_0012_function_datetimes_tz.test b/tests/sqllogictests/suites/query/functions/02_0012_function_datetimes_tz.test index 3638f64876183..e9a4e05f081d8 100644 --- a/tests/sqllogictests/suites/query/functions/02_0012_function_datetimes_tz.test +++ b/tests/sqllogictests/suites/query/functions/02_0012_function_datetimes_tz.test @@ -885,7 +885,7 @@ query T SELECT substr(DATE_ADD(month, 1, now())::String, 6, 2) = CASE WHEN substr(now()::String, 6, 2) = '12' THEN '01' - ELSE (substr(now()::String, 6, 2)::int + 1)::String + ELSE LPAD((substr(now()::String, 6, 2)::int + 1)::String, 2, '0') END; ---- 1 @@ -950,7 +950,7 @@ query T SELECT substr(DATE_ADD(month, 1, now())::String, 6, 2) = CASE WHEN substr(now()::String, 6, 2) = '12' THEN '01' - ELSE (substr(now()::String, 6, 2)::int + 1)::String + ELSE LPAD((substr(now()::String, 6, 2)::int + 1)::String, 2, '0') END; ---- 1 @@ -960,7 +960,7 @@ query T SELECT substr(DATE_ADD(month, 1, now())::String, 1, 4) = CASE WHEN substr(now()::String, 6, 2) = '12' THEN (substr(now()::String, 1,4)::int+1)::String - ELSE (substr(now()::String, 6, 2)::int + 1)::String + ELSE (substr(now()::String, 1, 4)::int)::String END; ---- 1 diff --git a/tests/sqllogictests/suites/query/functions/02_0075_function_datetimes_tz.test b/tests/sqllogictests/suites/query/functions/02_0075_function_datetimes_tz.test index aa25fdc80c44a..ecb8eddb12796 100644 --- a/tests/sqllogictests/suites/query/functions/02_0075_function_datetimes_tz.test +++ b/tests/sqllogictests/suites/query/functions/02_0075_function_datetimes_tz.test @@ -759,7 +759,7 @@ query T SELECT substr(DATE_ADD(month, 1, now())::String, 6, 2) = CASE WHEN substr(now()::String, 6, 2) = '12' THEN '01' - ELSE (substr(now()::String, 6, 2)::int + 1)::String + ELSE LPAD((substr(now()::String, 6, 2)::int + 1)::String, 2, '0') END; ---- 1 @@ -769,7 +769,7 @@ query T SELECT substr(DATE_ADD(month, 1, now())::String, 1, 4) = CASE WHEN substr(now()::String, 6, 2) = '12' THEN (substr(now()::String, 1,4)::int+1)::String - ELSE (substr(now()::String, 6, 2)::int + 1)::String + ELSE (substr(now()::String, 1, 4)::int)::String END; ---- 1 @@ -813,7 +813,7 @@ query T SELECT substr(DATE_ADD(month, 1, now())::String, 6, 2) = CASE WHEN substr(now()::String, 6, 2) = '12' THEN '01' - ELSE (substr(now()::String, 6, 2)::int + 1)::String + ELSE LPAD((substr(now()::String, 6, 2)::int + 1)::String, 2, '0') END; ---- 1 @@ -823,7 +823,7 @@ query T SELECT substr(DATE_ADD(month, 1, now())::String, 1, 4) = CASE WHEN substr(now()::String, 6, 2) = '12' THEN (substr(now()::String, 1,4)::int+1)::String - ELSE (substr(now()::String, 6, 2)::int + 1)::String + ELSE (substr(now()::String, 1, 4)::int)::String END; ---- 1