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.functions table.

    EXPAND ON
    SELECT * FROM system_schema.functions LIMIT 1;
    EXPAND OFF;

The following output shows the first record using the cqlsh EXPAND ON option.

Now Expanded output is enabled

 keyspace_name | function_name | argument_types | argument_names | body | called_on_null_input | deterministic | language | monotonic | monotonic_on | return_type
---------------+---------------+----------------+----------------+------+----------------------+---------------+----------+-----------+--------------+-------------

(0 rows)
Disabled Expanded output.
Now Expanded output is enabled

 keyspace_name | function_name | argument_types | argument_names | body | called_on_null_input | deterministic | language | monotonic | monotonic_on | return_type
---------------+---------------+----------------+----------------+------+----------------------+---------------+----------+-----------+--------------+-------------

(0 rows)
Disabled Expanded output.
  • List the schema settings for one user-defined aggregate.

    EXPAND ON
    SELECT * FROM system_schema.aggregates LIMIT 1;
    EXPAND OFF;
Now Expanded output is enabled

 keyspace_name | aggregate_name | argument_types | deterministic | final_func | initcond | return_type | state_func | state_type
---------------+----------------+----------------+---------------+------------+----------+-------------+------------+------------

(0 rows)
Disabled Expanded output.
Now Expanded output is enabled

 keyspace_name | aggregate_name | argument_types | deterministic | final_func | initcond | return_type | state_func | state_type
---------------+----------------+----------------+---------------+------------+----------+-------------+------------+------------

(0 rows)
Disabled Expanded output.
  • Show the schema settings for one user-defined type.

    EXPAND ON
    SELECT * FROM system_schema.types LIMIT 1;
    EXPAND OFF;
Now 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.
Now 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.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com