You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expr_fn!(ascii, arg1,"Returns the numeric code of the first character of the argument. In UTF8 encoding, returns the Unicode code point of the character. In other multibyte encodings, the argument must be an ASCII character.");
375
383
expr_fn!(asin, num);
376
-
scalar_function!(asinh,Asinh);
377
-
scalar_function!(atan,Atan);
378
-
scalar_function!(atanh,Atanh);
379
-
scalar_function!(atan2,Atan2);
384
+
expr_fn!(asinh,num);
385
+
expr_fn!(atan,num);
386
+
expr_fn!(atanh,num);
387
+
expr_fn!(atan2,y x);
380
388
expr_fn!(
381
389
bit_length,
382
390
arg,
383
391
"Returns number of bits in the string (8 times the octet_length)."
384
392
);
385
393
expr_fn_vec!(btrim,"Removes the longest string containing only characters in characters (a space by default) from the start and end of string.");
386
-
scalar_function!(cbrt,Cbrt);
387
-
scalar_function!(ceil,Ceil);
394
+
expr_fn!(cbrt,num);
395
+
expr_fn!(ceil,num);
388
396
expr_fn!(
389
397
character_length,
390
398
string,
@@ -393,44 +401,44 @@ expr_fn!(
393
401
expr_fn!(length, string);
394
402
expr_fn!(char_length, string);
395
403
expr_fn!(chr, arg,"Returns the character with the given code.");
396
-
scalar_function!(coalesce,Coalesce);
397
-
scalar_function!(cos,Cos);
398
-
scalar_function!(cosh,Cosh);
399
-
scalar_function!(degrees,Degrees);
404
+
expr_fn_vec!(coalesce);
405
+
expr_fn!(cos,num);
406
+
expr_fn!(cosh,num);
407
+
expr_fn!(degrees,num);
400
408
expr_fn!(decode, input encoding);
401
409
expr_fn!(encode, input encoding);
402
-
scalar_function!(exp,Exp);
403
-
scalar_function!(factorial,Factorial);
404
-
scalar_function!(floor,Floor);
405
-
scalar_function!(gcd,Gcd);
406
-
scalar_function!(initcap,InitCap,"Converts the first letter of each word to upper case and the rest to lower case. Words are sequences of alphanumeric characters separated by non-alphanumeric characters.");
410
+
expr_fn!(exp,num);
411
+
expr_fn!(factorial,num);
412
+
expr_fn!(floor,num);
413
+
expr_fn!(gcd,x y);
414
+
expr_fn!(initcap,string,"Converts the first letter of each word to upper case and the rest to lower case. Words are sequences of alphanumeric characters separated by non-alphanumeric characters.");
407
415
expr_fn!(isnan, num);
408
-
scalar_function!(iszero,Iszero);
409
-
scalar_function!(lcm,Lcm);
410
-
scalar_function!(left,Left,"Returns first n characters in the string, or when n is negative, returns all but last |n| characters.");
411
-
scalar_function!(ln,Ln);
412
-
scalar_function!(log,Log);
413
-
scalar_function!(log10,Log10);
414
-
scalar_function!(log2,Log2);
416
+
expr_fn!(iszero,num);
417
+
expr_fn!(lcm,x y);
418
+
expr_fn!(left,string n,"Returns first n characters in the string, or when n is negative, returns all but last |n| characters.");
419
+
expr_fn!(ln,num);
420
+
expr_fn!(log,base num);
421
+
expr_fn!(log10,num);
422
+
expr_fn!(log2,num);
415
423
expr_fn!(lower, arg1,"Converts the string to all lower case");
416
-
scalar_function!(lpad,Lpad,"Extends the string to length length by prepending the characters fill (a space by default). If the string is already longer than length then it is truncated (on the right).");
424
+
expr_fn_vec!(lpad,"Extends the string to length length by prepending the characters fill (a space by default). If the string is already longer than length then it is truncated (on the right).");
417
425
expr_fn_vec!(ltrim,"Removes the longest string containing only characters in characters (a space by default) from the start of string.");
418
426
expr_fn!(
419
427
md5,
420
428
input_arg,
421
429
"Computes the MD5 hash of the argument, with the result written in hexadecimal."
422
430
);
423
-
scalar_function!(
431
+
expr_fn!(
424
432
nanvl,
425
-
Nanvl,
433
+
x y,
426
434
"Returns x if x is not NaN otherwise returns y."
427
435
);
428
436
expr_fn!(nullif, arg_1 arg_2);
429
437
expr_fn_vec!(octet_length,"Returns number of bytes in the string. Since this version of the function accepts type character directly, it will not strip trailing spaces.");
430
-
scalar_function!(pi,Pi);
431
-
scalar_function!(power,Power);
432
-
scalar_function!(pow,Power);
433
-
scalar_function!(radians,Radians);
438
+
expr_fn!(pi);
439
+
expr_fn!(power,base exponent);
440
+
expr_fn!(pow,power, base exponent);
441
+
expr_fn!(radians,num);
434
442
expr_fn!(regexp_match, input_arg1 input_arg2);
435
443
expr_fn!(
436
444
regexp_replace,
@@ -443,31 +451,31 @@ expr_fn!(
443
451
string from to,
444
452
"Replaces all occurrences in string of substring from with substring to."
445
453
);
446
-
scalar_function!(
454
+
expr_fn!(
447
455
reverse,
448
-
Reverse,
456
+
string,
449
457
"Reverses the order of the characters in the string."
450
458
);
451
-
scalar_function!(right,Right,"Returns last n characters in the string, or when n is negative, returns all but first |n| characters.");
452
-
scalar_function!(round,Round);
453
-
scalar_function!(rpad,Rpad,"Extends the string to length length by appending the characters fill (a space by default). If the string is already longer than length then it is truncated.");
459
+
expr_fn!(right,string n,"Returns last n characters in the string, or when n is negative, returns all but first |n| characters.");
460
+
expr_fn_vec!(round);
461
+
expr_fn_vec!(rpad,"Extends the string to length length by appending the characters fill (a space by default). If the string is already longer than length then it is truncated.");
454
462
expr_fn_vec!(rtrim,"Removes the longest string containing only characters in characters (a space by default) from the end of string.");
455
463
expr_fn!(sha224, input_arg1);
456
464
expr_fn!(sha256, input_arg1);
457
465
expr_fn!(sha384, input_arg1);
458
466
expr_fn!(sha512, input_arg1);
459
-
scalar_function!(signum,Signum);
460
-
scalar_function!(sin,Sin);
461
-
scalar_function!(sinh,Sinh);
467
+
expr_fn!(signum,num);
468
+
expr_fn!(sin,num);
469
+
expr_fn!(sinh,num);
462
470
expr_fn!(
463
471
split_part,
464
472
string delimiter index,
465
473
"Splits string at occurrences of delimiter and returns the n'th field (counting from one)."
466
474
);
467
-
scalar_function!(sqrt,Sqrt);
475
+
expr_fn!(sqrt,num);
468
476
expr_fn!(starts_with, arg1 arg2,"Returns true if string starts with prefix.");
469
-
scalar_function!(strpos,Strpos,"Returns starting index of specified substring within string, or zero if it's not present. (Same as position(substring in string), but note the reversed argument order.)");
470
-
scalar_function!(substr,Substr);
477
+
expr_fn!(strpos,string substring,"Returns starting index of specified substring within string, or zero if it's not present. (Same as position(substring in string), but note the reversed argument order.)");
478
+
expr_fn!(substr,string position);
471
479
expr_fn!(tan, num);
472
480
expr_fn!(tanh, num);
473
481
expr_fn!(
@@ -488,15 +496,15 @@ expr_fn!(date_trunc, part date);
488
496
expr_fn!(datetrunc, date_trunc, part date);
489
497
expr_fn!(date_bin, stride source origin);
490
498
491
-
scalar_function!(translate,Translate,"Replaces each character in string that matches a character in the from set with the corresponding character in the to set. If from is longer than to, occurrences of the extra characters in from are deleted.");
499
+
expr_fn!(translate,string from to,"Replaces each character in string that matches a character in the from set with the corresponding character in the to set. If from is longer than to, occurrences of the extra characters in from are deleted.");
492
500
expr_fn_vec!(trim,"Removes the longest string containing only characters in characters (a space by default) from the start, end, or both ends (BOTH is the default) of string.");
493
-
scalar_function!(trunc,Trunc);
501
+
expr_fn_vec!(trunc);
494
502
expr_fn!(upper, arg1,"Converts the string to all upper case.");
495
503
expr_fn!(uuid);
496
-
expr_fn!(r#struct, args);// Use raw identifier since struct is a keyword
504
+
expr_fn_vec!(r#struct);// Use raw identifier since struct is a keyword
0 commit comments