Functions, aggregates, and user types
Query system_schema functions, aggregates, and types tables to get information about user-defined functions (UDFs), user-defined aggregates (UDAs), and user-defined types (UDTs).
-
Show one user-defined function in the
system_schema.functionstable.EXPAND ON SELECT * FROM system_schema.functions LIMIT 1; EXPAND OFF;You can format the output with the CQL shell
ONoption:Result@ Row 1 ----------------------+------------------------------------------------------------------------------------------------------------------ -------------------------------------------------------- keyspace_name | cycling function_name | avgfinal argument_types | ['frozen<tuple<int, bigint>>'] argument_names | ['state'] body | \n double r = 0; \n if (state.getInt(0) == 0) return null; \n r = state.getLong(1); \n r /= s tate.getInt(0); \n return Double.valueOf(r);\n called_on_null_input | True deterministic | False language | java monotonic | False monotonic_on | [] return_type | double (1 rows)
-
List the schema settings for one user-defined aggregate.
EXPAND ON SELECT * FROM system_schema.aggregates LIMIT 1; EXPAND OFF;Result@ Row 1 ----------------+---------------------------- keyspace_name | cycling aggregate_name | average argument_types | ['int'] deterministic | False final_func | avgfinal initcond | (0, 0) return_type | double state_func | avgstate state_type | frozen<tuple<int, bigint>> (1 rows)
-
Show the schema settings for one user-defined type.
EXPAND ON SELECT * FROM system_schema.types LIMIT 1; EXPAND OFF;ResultNow Expanded output is enabled @ Row 1 ---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- keyspace_name | dse_insights type_name | insights_config_type field_names | ['mode', 'upload_url', 'upload_interval_in_seconds', 'metric_sampling_interval_in_seconds', 'data_dir_max_size_in_mb', 'proxy_type', 'proxy_url', 'proxy_authentication', 'node_system_info_report_period', 'config_refresh_interval_in_seconds', 'filtering_rules'] field_types | ['text', 'text', 'int', 'int', 'int', 'text', 'text', 'text', 'text', 'int', 'frozen<set<frozen<insights_filters_rule_type>>>'] (1 rows) Disabled Expanded output.