MCPcopy Create free account
hub / github.com/apache/datafusion / function_details

Method function_details

datafusion-cli/src/functions.rs:73–175  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

71
72impl Function {
73 pub fn function_details(&self) -> Result<&str> {
74 let details = match self {
75 Function::Select => {
76 r#"
77Command: SELECT
78Description: retrieve rows from a table or view
79Syntax:
80SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
81 [ * | expression [ [ AS ] output_name ] [, ...] ]
82 [ FROM from_item [, ...] ]
83 [ WHERE condition ]
84 [ GROUP BY [ ALL | DISTINCT ] grouping_element [, ...] ]
85 [ HAVING condition ]
86 [ WINDOW window_name AS ( window_definition ) [, ...] ]
87 [ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] select ]
88 [ ORDER BY expression [ ASC | DESC | USING operator ] [ NULLS { FIRST | LAST } ] [, ...] ]
89 [ LIMIT { count | ALL } ]
90 [ OFFSET start [ ROW | ROWS ] ]
91
92where from_item can be one of:
93
94 [ ONLY ] table_name [ * ] [ [ AS ] alias [ ( column_alias [, ...] ) ] ]
95 [ TABLESAMPLE sampling_method ( argument [, ...] ) [ REPEATABLE ( seed ) ] ]
96 [ LATERAL ] ( select ) [ AS ] alias [ ( column_alias [, ...] ) ]
97 with_query_name [ [ AS ] alias [ ( column_alias [, ...] ) ] ]
98 [ LATERAL ] function_name ( [ argument [, ...] ] )
99 [ WITH ORDINALITY ] [ [ AS ] alias [ ( column_alias [, ...] ) ] ]
100 [ LATERAL ] function_name ( [ argument [, ...] ] ) [ AS ] alias ( column_definition [, ...] )
101 [ LATERAL ] function_name ( [ argument [, ...] ] ) AS ( column_definition [, ...] )
102 [ LATERAL ] ROWS FROM( function_name ( [ argument [, ...] ] ) [ AS ( column_definition [, ...] ) ] [, ...] )
103 [ WITH ORDINALITY ] [ [ AS ] alias [ ( column_alias [, ...] ) ] ]
104 from_item [ NATURAL ] join_type from_item [ ON join_condition | USING ( join_column [, ...] ) [ AS join_using_alias ] ]
105
106and grouping_element can be one of:
107
108 ( )
109 expression
110 ( expression [, ...] )
111
112and with_query is:
113
114 with_query_name [ ( column_name [, ...] ) ] AS [ [ NOT ] MATERIALIZED ] ( select | values | insert | update | delete )
115
116TABLE [ ONLY ] table_name [ * ]"#
117 }
118 Function::Explain => {
119 r#"
120Command: EXPLAIN
121Description: show the execution plan of a statement
122Syntax:
123EXPLAIN [ ANALYZE ] statement
124"#
125 }
126 Function::Show => {
127 r#"
128Command: SHOW
129Description: show the value of a run-time parameter
130Syntax:

Callers 1

executeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected