Skip to content

Commit

Permalink
feat: handle parentheses with unary ops (#4290)
Browse files Browse the repository at this point in the history
* feat: handle parentheses with unary ops

Signed-off-by: Ruihang Xia <[email protected]>

* clean up

Signed-off-by: Ruihang Xia <[email protected]>

* add comment

Signed-off-by: Ruihang Xia <[email protected]>

* add sqlness test

Signed-off-by: Ruihang Xia <[email protected]>

* check tokens before convert to RPN

Signed-off-by: Ruihang Xia <[email protected]>

* add test cases to sqlness

Signed-off-by: Ruihang Xia <[email protected]>

* fix clippy

Signed-off-by: Ruihang Xia <[email protected]>

---------

Signed-off-by: Ruihang Xia <[email protected]>
Co-authored-by: dennis zhuang <[email protected]>
  • Loading branch information
waynexia and killme2008 authored Jul 9, 2024
1 parent f1d17a8 commit 23bb9d9
Show file tree
Hide file tree
Showing 5 changed files with 622 additions and 113 deletions.
4 changes: 4 additions & 0 deletions src/common/function/src/function_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use crate::function::FunctionRef;
use crate::scalars::aggregate::{AggregateFunctionMetaRef, AggregateFunctions};
use crate::scalars::date::DateFunction;
use crate::scalars::expression::ExpressionFunction;
use crate::scalars::matches::MatchesFunction;
use crate::scalars::math::MathFunction;
use crate::scalars::numpy::NumpyFunction;
use crate::scalars::timestamp::TimestampFunction;
Expand Down Expand Up @@ -86,6 +87,9 @@ pub static FUNCTION_REGISTRY: Lazy<Arc<FunctionRegistry>> = Lazy::new(|| {
// Aggregate functions
AggregateFunctions::register(&function_registry);

// Full text search function
MatchesFunction::register(&function_registry);

// System and administration functions
SystemFunction::register(&function_registry);
TableFunction::register(&function_registry);
Expand Down
1 change: 1 addition & 0 deletions src/common/function/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

#![feature(let_chains)]
#![feature(try_blocks)]

mod macros;
pub mod scalars;
Expand Down
Loading

0 comments on commit 23bb9d9

Please sign in to comment.