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.

WARNING: cqlsh was built against 5.0-beta1, but this server is 5.0.  All features may not work!
EXPAND set to ON

 keyspace_name | function_name | argument_types | argument_names | body | called_on_null_input | language | return_type
---------------+---------------+----------------+----------------+------+----------------------+----------+-------------


(0 rows)
EXPAND set to OFF
  • List the schema settings for one user-defined aggregate.

    EXPAND ON
    SELECT * FROM system_schema.aggregates LIMIT 1;
    EXPAND OFF;
WARNING: cqlsh was built against 5.0-beta1, but this server is 5.0.  All features may not work!
EXPAND set to ON

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


(0 rows)
EXPAND set to OFF
  • Show the schema settings for one user-defined type.

    EXPAND ON
    SELECT * FROM system_schema.types LIMIT 1;
    EXPAND OFF;
WARNING: cqlsh was built against 5.0-beta1, but this server is 5.0.  All features may not work!
EXPAND set to ON

 keyspace_name | type_name | field_names | field_types
---------------+-----------+-------------+-------------


(0 rows)
EXPAND set to OFF

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