This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 61578f92e6 [chore](function name order) reorder math functions in
doris_builtins_functions #24716
61578f92e6 is described below
commit 61578f92e62be56674e40e8588c75bed108b0ea3
Author: zhiqqqq <[email protected]>
AuthorDate: Thu Sep 21 15:07:50 2023 +0800
[chore](function name order) reorder math functions in
doris_builtins_functions #24716
---
gensrc/script/doris_builtins_functions.py | 202 +++++++++++++++---------------
1 file changed, 102 insertions(+), 100 deletions(-)
diff --git a/gensrc/script/doris_builtins_functions.py
b/gensrc/script/doris_builtins_functions.py
index e58df6cb15..e6e5192f3a 100644
--- a/gensrc/script/doris_builtins_functions.py
+++ b/gensrc/script/doris_builtins_functions.py
@@ -1249,10 +1249,8 @@ visible_functions = {
# Math builtin functions
+ # Please make sure functions are ordered by alphabetical order
"Math": [
- [['pi'], 'DOUBLE', [], 'ALWAYS_NOT_NULLABLE'],
- [['e'], 'DOUBLE', [], 'ALWAYS_NOT_NULLABLE'],
-
[['abs'], 'DOUBLE', ['DOUBLE'], ''],
[['abs'], 'FLOAT', ['FLOAT'], ''],
[['abs'], 'LARGEINT', ['LARGEINT'], ''],
@@ -1264,84 +1262,84 @@ visible_functions = {
[['abs'], 'DECIMAL32', ['DECIMAL32'], ''],
[['abs'], 'DECIMAL64', ['DECIMAL64'], ''],
[['abs'], 'DECIMAL128', ['DECIMAL128'], ''],
-
- [['sign'], 'TINYINT', ['DOUBLE'], ''],
- [['sin'], 'DOUBLE', ['DOUBLE'], ''],
- [['asin'], 'DOUBLE', ['DOUBLE'], ''],
- [['cos'], 'DOUBLE', ['DOUBLE'], ''],
[['acos'], 'DOUBLE', ['DOUBLE'], ''],
- [['tan'], 'DOUBLE', ['DOUBLE'], ''],
[['atan'], 'DOUBLE', ['DOUBLE'], ''],
+ [['asin'], 'DOUBLE', ['DOUBLE'], ''],
+ [['bin'], 'VARCHAR', ['BIGINT'], ''],
+
+ [['cbrt'], 'DOUBLE', ['DOUBLE'], ''],
[['ceil', 'ceiling', 'dceil'], 'DOUBLE', ['DOUBLE'], ''],
- [['floor', 'dfloor'], 'DOUBLE', ['DOUBLE'], ''],
- [['round', 'dround'], 'DOUBLE', ['DOUBLE'], ''],
- [['round_bankers'], 'DOUBLE', ['DOUBLE'], ''],
[['ceil', 'ceiling', 'dceil'], 'DOUBLE', ['DOUBLE', 'INT'], ''],
- [['floor', 'dfloor'], 'DOUBLE', ['DOUBLE', 'INT'], ''],
- [['round', 'dround'], 'DOUBLE', ['DOUBLE', 'INT'], ''],
- [['round_bankers'], 'DOUBLE', ['DOUBLE', 'INT'], ''],
- [['truncate'], 'DOUBLE', ['DOUBLE'], ''],
[['ceil', 'ceiling', 'dceil'], 'DECIMAL32', ['DECIMAL32'], ''],
- [['floor', 'dfloor'], 'DECIMAL32', ['DECIMAL32'], ''],
- [['round', 'dround'], 'DECIMAL32', ['DECIMAL32'], ''],
- [['round_bankers'], 'DECIMAL32', ['DECIMAL32'], ''],
[['ceil', 'ceiling', 'dceil'], 'DECIMAL64', ['DECIMAL64'], ''],
- [['floor', 'dfloor'], 'DECIMAL64', ['DECIMAL64'], ''],
- [['round', 'dround'], 'DECIMAL64', ['DECIMAL64'], ''],
- [['round_bankers'], 'DECIMAL64', ['DECIMAL64'], ''],
[['ceil', 'ceiling', 'dceil'], 'DECIMAL128', ['DECIMAL128'], ''],
- [['floor', 'dfloor'], 'DECIMAL128', ['DECIMAL128'], ''],
- [['round', 'dround'], 'DECIMAL128', ['DECIMAL128'], ''],
- [['round_bankers'], 'DECIMAL128', ['DECIMAL128'], ''],
- [['round', 'dround'], 'DOUBLE', ['DOUBLE', 'INT'], ''],
- [['round', 'dround'], 'DECIMAL32', ['DECIMAL32', 'INT'], ''],
- [['round', 'dround'], 'DECIMAL64', ['DECIMAL64', 'INT'], ''],
- [['round', 'dround'], 'DECIMAL128', ['DECIMAL128', 'INT'], ''],
- [['round_bankers', 'round_bankers'], 'DOUBLE', ['DOUBLE', 'INT'], ''],
- [['round_bankers'], 'DECIMAL32', ['DECIMAL32', 'INT'], ''],
- [['round_bankers'], 'DECIMAL64', ['DECIMAL64', 'INT'], ''],
- [['round_bankers'], 'DECIMAL128', ['DECIMAL128', 'INT'], ''],
- [['floor', 'dfloor'], 'DECIMAL32', ['DECIMAL32', 'INT'], ''],
- [['floor', 'dfloor'], 'DECIMAL64', ['DECIMAL64', 'INT'], ''],
- [['floor', 'dfloor'], 'DECIMAL128', ['DECIMAL128', 'INT'], ''],
[['ceil', 'dceil'], 'DECIMAL32', ['DECIMAL32', 'INT'], ''],
[['ceil', 'dceil'], 'DECIMAL64', ['DECIMAL64', 'INT'], ''],
[['ceil', 'dceil'], 'DECIMAL128', ['DECIMAL128', 'INT'], ''],
- [['truncate'], 'DOUBLE', ['DOUBLE', 'INT'], ''],
- [['truncate'], 'DECIMAL32', ['DECIMAL32', 'INT'], ''],
- [['truncate'], 'DECIMAL64', ['DECIMAL64', 'INT'], ''],
- [['truncate'], 'DECIMAL128', ['DECIMAL128', 'INT'], ''],
-
- [['ln', 'dlog1'], 'DOUBLE', ['DOUBLE'], 'ALWAYS_NULLABLE'],
- [['log'], 'DOUBLE', ['DOUBLE', 'DOUBLE'], 'ALWAYS_NULLABLE'],
- [['log2'], 'DOUBLE', ['DOUBLE'], 'ALWAYS_NULLABLE'],
- [['log10', 'dlog10'], 'DOUBLE', ['DOUBLE'], 'ALWAYS_NULLABLE'],
- [['exp', 'dexp'], 'DOUBLE', ['DOUBLE'], ''],
+ [['conv'], 'VARCHAR', ['BIGINT', 'TINYINT', 'TINYINT'],
'ALWAYS_NULLABLE'],
+ [['conv'], 'VARCHAR', ['VARCHAR', 'TINYINT', 'TINYINT'],
'ALWAYS_NULLABLE'],
+ [['conv'], 'VARCHAR', ['STRING', 'TINYINT', 'TINYINT'],
'ALWAYS_NULLABLE'],
+ [['cos'], 'DOUBLE', ['DOUBLE'], ''],
- [['radians'], 'DOUBLE', ['DOUBLE'], ''],
[['degrees'], 'DOUBLE', ['DOUBLE'], ''],
- [['sqrt', 'dsqrt'], 'DOUBLE', ['DOUBLE'], ''],
- [['cbrt'], 'DOUBLE', ['DOUBLE'], ''],
- [['pow', 'power', 'dpow', 'fpow'], 'DOUBLE', ['DOUBLE', 'DOUBLE'], ''],
+ [['e'], 'DOUBLE', [], 'ALWAYS_NOT_NULLABLE'],
+ [['exp', 'dexp'], 'DOUBLE', ['DOUBLE'], ''],
- [['rand', 'random'], 'DOUBLE', [], 'ALWAYS_NOT_NULLABLE'],
- [['rand', 'random'], 'DOUBLE', ['BIGINT'], ''],
+ [['floor', 'dfloor'], 'DOUBLE', ['DOUBLE'], ''],
+ [['floor', 'dfloor'], 'DOUBLE', ['DOUBLE', 'INT'], ''],
+ [['floor', 'dfloor'], 'DECIMAL32', ['DECIMAL32'], ''],
+ [['floor', 'dfloor'], 'DECIMAL32', ['DECIMAL32', 'INT'], ''],
+ [['floor', 'dfloor'], 'DECIMAL64', ['DECIMAL64'], ''],
+ [['floor', 'dfloor'], 'DECIMAL64', ['DECIMAL64', 'INT'], ''],
+ [['floor', 'dfloor'], 'DECIMAL128', ['DECIMAL128'], ''],
+ [['floor', 'dfloor'], 'DECIMAL128', ['DECIMAL128', 'INT'], ''],
+
+ [['greatest'], 'TINYINT', ['TINYINT', '...'], ''],
+ [['greatest'], 'SMALLINT', ['SMALLINT', '...'], ''],
+ [['greatest'], 'INT', ['INT', '...'], ''],
+ [['greatest'], 'BIGINT', ['BIGINT', '...'], ''],
+ [['greatest'], 'LARGEINT', ['LARGEINT', '...'], ''],
+ [['greatest'], 'FLOAT', ['FLOAT', '...'], ''],
+ [['greatest'], 'DOUBLE', ['DOUBLE', '...'], ''],
+ [['greatest'], 'DECIMALV2', ['DECIMALV2', '...'], ''],
+ [['greatest'], 'DECIMAL32', ['DECIMAL32', '...'], ''],
+ [['greatest'], 'DECIMAL64', ['DECIMAL64', '...'], ''],
+ [['greatest'], 'DECIMAL128', ['DECIMAL128', '...'], ''],
+ [['greatest'], 'DATE', ['DATE', '...'], ''],
+ [['greatest'], 'DATEV2', ['DATEV2', '...'], ''],
+ [['greatest'], 'DATETIME', ['DATETIME', '...'], ''],
+ [['greatest'], 'DATETIMEV2', ['DATETIMEV2', '...'], ''],
+ [['greatest'], 'VARCHAR', ['VARCHAR', '...'], ''],
+ [['greatest'], 'STRING', ['STRING', '...'], ''],
- [['bin'], 'VARCHAR', ['BIGINT'], ''],
[['hex'], 'VARCHAR', ['BIGINT'], ''],
[['hex'], 'VARCHAR', ['VARCHAR'], ''],
[['hex'], 'STRING', ['STRING'], ''],
- [['unhex'], 'VARCHAR', ['VARCHAR'], 'ALWAYS_NULLABLE'],
- [['unhex'], 'STRING', ['STRING'], 'ALWAYS_NULLABLE'],
- [['conv'], 'VARCHAR', ['BIGINT', 'TINYINT', 'TINYINT'],
'ALWAYS_NULLABLE'],
- [['conv'], 'VARCHAR', ['VARCHAR', 'TINYINT', 'TINYINT'],
'ALWAYS_NULLABLE'],
- [['conv'], 'VARCHAR', ['STRING', 'TINYINT', 'TINYINT'],
'ALWAYS_NULLABLE'],
+ [['ln', 'dlog1'], 'DOUBLE', ['DOUBLE'], 'ALWAYS_NULLABLE'],
+ [['log'], 'DOUBLE', ['DOUBLE', 'DOUBLE'], 'ALWAYS_NULLABLE'],
+ [['log2'], 'DOUBLE', ['DOUBLE'], 'ALWAYS_NULLABLE'],
+ [['log10', 'dlog10'], 'DOUBLE', ['DOUBLE'], 'ALWAYS_NULLABLE'],
+ [['least'], 'TINYINT', ['TINYINT', '...'], ''],
+ [['least'], 'SMALLINT', ['SMALLINT', '...'], ''],
+ [['least'], 'INT', ['INT', '...'], ''],
+ [['least'], 'BIGINT', ['BIGINT', '...'], ''],
+ [['least'], 'LARGEINT', ['LARGEINT', '...'], ''],
+ [['least'], 'FLOAT', ['FLOAT', '...'], ''],
+ [['least'], 'DOUBLE', ['DOUBLE', '...'], ''],
+ [['least'], 'DATE', ['DATE', '...'], ''],
+ [['least'], 'DATEV2', ['DATEV2', '...'], ''],
+ [['least'], 'DATETIME', ['DATETIME', '...'], ''],
+ [['least'], 'DATETIMEV2', ['DATETIMEV2', '...'], ''],
+ [['least'], 'DECIMALV2', ['DECIMALV2', '...'], ''],
+ [['least'], 'DECIMAL32', ['DECIMAL32', '...'], ''],
+ [['least'], 'DECIMAL64', ['DECIMAL64', '...'], ''],
+ [['least'], 'DECIMAL128', ['DECIMAL128', '...'], ''],
+ [['least'], 'VARCHAR', ['VARCHAR', '...'], ''],
+ [['least'], 'STRING', ['STRING', '...'], ''],
- [['pmod'], 'BIGINT', ['BIGINT', 'BIGINT'], 'ALWAYS_NULLABLE'],
- [['pmod'], 'DOUBLE', ['DOUBLE', 'DOUBLE'], 'ALWAYS_NULLABLE'],
[['mod'], 'TINYINT', ['TINYINT', 'TINYINT'], 'ALWAYS_NULLABLE'],
[['mod'], 'SMALLINT', ['SMALLINT', 'SMALLINT'], 'ALWAYS_NULLABLE'],
[['mod'], 'INT', ['INT', 'INT'], 'ALWAYS_NULLABLE'],
@@ -1354,12 +1352,6 @@ visible_functions = {
[['mod', 'fmod'], 'FLOAT', ['FLOAT', 'FLOAT'], 'ALWAYS_NULLABLE'],
[['mod', 'fmod'], 'DOUBLE', ['DOUBLE', 'DOUBLE'], 'ALWAYS_NULLABLE'],
- [['positive'], 'BIGINT', ['BIGINT'], ''],
- [['positive'], 'DOUBLE', ['DOUBLE'], ''],
- [['positive'], 'DECIMALV2', ['DECIMALV2'], ''],
- [['positive'], 'DECIMAL32', ['DECIMAL32'], ''],
- [['positive'], 'DECIMAL64', ['DECIMAL64'], ''],
- [['positive'], 'DECIMAL128', ['DECIMAL128'], ''],
[['negative'], 'BIGINT', ['BIGINT'], ''],
[['negative'], 'DOUBLE', ['DOUBLE'], ''],
[['negative'], 'DECIMALV2', ['DECIMALV2'], ''],
@@ -1367,41 +1359,51 @@ visible_functions = {
[['negative'], 'DECIMAL64', ['DECIMAL64'], ''],
[['negative'], 'DECIMAL128', ['DECIMAL128'], ''],
- [['least'], 'TINYINT', ['TINYINT', '...'], ''],
- [['least'], 'SMALLINT', ['SMALLINT', '...'], ''],
- [['least'], 'INT', ['INT', '...'], ''],
- [['least'], 'BIGINT', ['BIGINT', '...'], ''],
- [['least'], 'LARGEINT', ['LARGEINT', '...'], ''],
- [['least'], 'FLOAT', ['FLOAT', '...'], ''],
- [['least'], 'DOUBLE', ['DOUBLE', '...'], ''],
- [['least'], 'DATE', ['DATE', '...'], ''],
- [['least'], 'DATEV2', ['DATEV2', '...'], ''],
- [['least'], 'DATETIME', ['DATETIME', '...'], ''],
- [['least'], 'DATETIMEV2', ['DATETIMEV2', '...'], ''],
- [['least'], 'DECIMALV2', ['DECIMALV2', '...'], ''],
- [['least'], 'DECIMAL32', ['DECIMAL32', '...'], ''],
- [['least'], 'DECIMAL64', ['DECIMAL64', '...'], ''],
- [['least'], 'DECIMAL128', ['DECIMAL128', '...'], ''],
- [['least'], 'VARCHAR', ['VARCHAR', '...'], ''],
- [['least'], 'STRING', ['STRING', '...'], ''],
+ [['pi'], 'DOUBLE', [], 'ALWAYS_NOT_NULLABLE'],
+ [['pmod'], 'BIGINT', ['BIGINT', 'BIGINT'], 'ALWAYS_NULLABLE'],
+ [['pmod'], 'DOUBLE', ['DOUBLE', 'DOUBLE'], 'ALWAYS_NULLABLE'],
+ [['positive'], 'BIGINT', ['BIGINT'], ''],
+ [['positive'], 'DOUBLE', ['DOUBLE'], ''],
+ [['positive'], 'DECIMALV2', ['DECIMALV2'], ''],
+ [['positive'], 'DECIMAL32', ['DECIMAL32'], ''],
+ [['positive'], 'DECIMAL64', ['DECIMAL64'], ''],
+ [['positive'], 'DECIMAL128', ['DECIMAL128'], ''],
+ [['pow', 'power', 'dpow', 'fpow'], 'DOUBLE', ['DOUBLE', 'DOUBLE'], ''],
- [['greatest'], 'TINYINT', ['TINYINT', '...'], ''],
- [['greatest'], 'SMALLINT', ['SMALLINT', '...'], ''],
- [['greatest'], 'INT', ['INT', '...'], ''],
- [['greatest'], 'BIGINT', ['BIGINT', '...'], ''],
- [['greatest'], 'LARGEINT', ['LARGEINT', '...'], ''],
- [['greatest'], 'FLOAT', ['FLOAT', '...'], ''],
- [['greatest'], 'DOUBLE', ['DOUBLE', '...'], ''],
- [['greatest'], 'DECIMALV2', ['DECIMALV2', '...'], ''],
- [['greatest'], 'DECIMAL32', ['DECIMAL32', '...'], ''],
- [['greatest'], 'DECIMAL64', ['DECIMAL64', '...'], ''],
- [['greatest'], 'DECIMAL128', ['DECIMAL128', '...'], ''],
- [['greatest'], 'DATE', ['DATE', '...'], ''],
- [['greatest'], 'DATEV2', ['DATEV2', '...'], ''],
- [['greatest'], 'DATETIME', ['DATETIME', '...'], ''],
- [['greatest'], 'DATETIMEV2', ['DATETIMEV2', '...'], ''],
- [['greatest'], 'VARCHAR', ['VARCHAR', '...'], ''],
- [['greatest'], 'STRING', ['STRING', '...'], '']
+ [['radians'], 'DOUBLE', ['DOUBLE'], ''],
+ [['rand', 'random'], 'DOUBLE', [], 'ALWAYS_NOT_NULLABLE'],
+ [['rand', 'random'], 'DOUBLE', ['BIGINT'], ''],
+ [['round', 'dround'], 'DOUBLE', ['DOUBLE'], ''],
+ [['round', 'dround'], 'DOUBLE', ['DOUBLE', 'INT'], ''],
+ [['round', 'dround'], 'DECIMAL32', ['DECIMAL32'], ''],
+ [['round', 'dround'], 'DECIMAL32', ['DECIMAL32', 'INT'], ''],
+ [['round', 'dround'], 'DECIMAL64', ['DECIMAL64'], ''],
+ [['round', 'dround'], 'DECIMAL64', ['DECIMAL64', 'INT'], ''],
+ [['round', 'dround'], 'DECIMAL128', ['DECIMAL128'], ''],
+ [['round', 'dround'], 'DECIMAL128', ['DECIMAL128', 'INT'], ''],
+ [['round_bankers'], 'DOUBLE', ['DOUBLE'], ''],
+ [['round_bankers'], 'DOUBLE', ['DOUBLE', 'INT'], ''],
+ [['round_bankers'], 'DECIMAL32', ['DECIMAL32'], ''],
+ [['round_bankers'], 'DECIMAL32', ['DECIMAL32', 'INT'], ''],
+ [['round_bankers'], 'DECIMAL64', ['DECIMAL64'], ''],
+ [['round_bankers'], 'DECIMAL64', ['DECIMAL64', 'INT'], ''],
+ [['round_bankers'], 'DECIMAL128', ['DECIMAL128'], ''],
+ [['round_bankers'], 'DECIMAL128', ['DECIMAL128', 'INT'], ''],
+ [['round_bankers', 'round_bankers'], 'DOUBLE', ['DOUBLE', 'INT'], ''],
+
+ [['sign'], 'TINYINT', ['DOUBLE'], ''],
+ [['sin'], 'DOUBLE', ['DOUBLE'], ''],
+ [['sqrt', 'dsqrt'], 'DOUBLE', ['DOUBLE'], ''],
+
+ [['tan'], 'DOUBLE', ['DOUBLE'], ''],
+ [['truncate'], 'DOUBLE', ['DOUBLE'], ''],
+ [['truncate'], 'DOUBLE', ['DOUBLE', 'INT'], ''],
+ [['truncate'], 'DECIMAL32', ['DECIMAL32', 'INT'], ''],
+ [['truncate'], 'DECIMAL64', ['DECIMAL64', 'INT'], ''],
+ [['truncate'], 'DECIMAL128', ['DECIMAL128', 'INT'], ''],
+
+ [['unhex'], 'VARCHAR', ['VARCHAR'], 'ALWAYS_NULLABLE'],
+ [['unhex'], 'STRING', ['STRING'], 'ALWAYS_NULLABLE']
],
# Conditional Functions
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]