forked from risingwavelabs/risingwave
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(expr): support builtin function pi. (risingwavelabs#8509)
- Loading branch information
1 parent
8be4734
commit 9f68cef
Showing
5 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
statement ok | ||
create table f64_table (a double); | ||
|
||
statement ok | ||
insert into f64_table values(pi()); | ||
|
||
statement ok | ||
insert into f64_table values(1.618033); | ||
|
||
statement ok | ||
create table f32_table (a real); | ||
|
||
statement ok | ||
insert into f32_table values(pi()); | ||
|
||
query I | ||
SELECT pi() | ||
---- | ||
3.141592653589793 | ||
|
||
query I rowsort | ||
SELECT pi(), a from f64_table | ||
---- | ||
3.141592653589793 1.618033 | ||
3.141592653589793 3.141592653589793 | ||
|
||
|
||
statement ok | ||
drop table f64_table | ||
|
||
statement ok | ||
drop table f32_table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters