@@ -615,7 +615,7 @@ Cache query results or function call results to a specified table.
615615
616616``` sql
617617CACHE TABLE table_name AS
618- {CALL function_name([arg1, arg2, ...]) [LIKE like_table] [ASYNC]
618+ {CALL function_name([arg1, arg2, ...]) [LIKE { like_table | FUNCTION ' function_name ' } ] [ASYNC]
619619 | select_statement}
620620```
621621
@@ -627,6 +627,7 @@ CACHE TABLE table_name AS
627627| ` function_name ` | Function name to call, can be an identifier or ` GET() ` expression |
628628| ` arg1, arg2, ... ` | Function parameters, can be identifiers, ` GET() ` expressions, or string literals |
629629| ` like_table ` | Optional. Specify template table for result table |
630+ | ` FUNCTION 'function_name' ` | Optional. Specify that the result table schema matches the output schema of a function |
630631| ` ASYNC ` | Optional. Execute asynchronously |
631632| ` select_statement ` | SELECT query statement |
632633
@@ -642,6 +643,9 @@ CALL my_function('param1', 'param2');
642643CACHE TABLE cached_result AS
643644CALL my_function(GET(' var1' ), ' param2' ) LIKE template_table;
644645
646+ CACHE TABLE cached_result AS
647+ CALL my_function(GET(' var1' ), ' param2' ) LIKE FUNCTION ' template_function' ;
648+
645649CACHE TABLE cached_result AS
646650CALL my_function(' param1' ) ASYNC;
647651```
@@ -656,7 +660,7 @@ Call a SQL function.
656660** Syntax:**
657661
658662``` sql
659- CALL function_name([arg1, arg2, ...]) [LIKE like_table] [ASYNC]
663+ CALL function_name([arg1, arg2, ...]) [LIKE { like_table | FUNCTION ' function_name ' } ] [ASYNC]
660664```
661665
662666** Parameters:**
@@ -666,6 +670,7 @@ CALL function_name([arg1, arg2, ...]) [LIKE like_table] [ASYNC]
666670| ` function_name ` | Function name, can be an identifier or ` GET() ` expression |
667671| ` arg1, arg2, ... ` | Function parameters, can be identifiers, ` GET() ` expressions, or string literals |
668672| ` like_table ` | Optional. Specify template table for result table |
673+ | ` FUNCTION 'function_name' ` | Optional. Specify that the result table schema matches the output schema of a function |
669674| ` ASYNC ` | Optional. Execute asynchronously |
670675
671676** Examples:**
@@ -675,6 +680,8 @@ CALL my_function('param1', 'param2');
675680
676681CALL my_function(GET(' var1' ), ' param2' ) LIKE template_table;
677682
683+ CALL my_function(GET(' var1' ), ' param2' ) LIKE FUNCTION ' template_function' ;
684+
678685CALL my_function(' param1' ) ASYNC;
679686
680687CALL GET(' fun1' )(GET(' id' ), t1, ' 10' ) LIKE t1;
0 commit comments