Skip to content

Commit

Permalink
Allow REPLACE
Browse files Browse the repository at this point in the history
  • Loading branch information
emk committed Feb 16, 2024
1 parent e4877af commit ad6179e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ RAND = Fn() -> FLOAT64;
RANK = FnOver() -> INT64;
REGEXP_EXTRACT = Fn(STRING, STRING) -> STRING;
REGEXP_REPLACE = Fn(STRING, STRING, STRING) -> STRING;
REPLACE = Fn(STRING, STRING, STRING) -> STRING;
ROW_NUMBER = FnOver() -> INT64;
SHA256 = Fn(STRING) -> BYTES;
SUM = FnAgg(Agg<INT64>) -> INT64 | FnAgg(Agg<FLOAT64>) -> FLOAT64
Expand Down
11 changes: 11 additions & 0 deletions tests/sql/functions/simple/replace.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- pending: sqlite3 Probably exists, but haven't checked.

CREATE OR REPLACE TABLE __result1 AS
SELECT
replace('hello world', 'world', 'universe') AS replace1;

CREATE OR REPLACE TABLE __expected1 (
replace1 STRING
);
INSERT INTO __expected1 VALUES
('hello universe');

0 comments on commit ad6179e

Please sign in to comment.