• The SET function is an aggregation function designed for single-assign attributes.
  • It constructs a set of non-NULL values from the specified attribute.

Data Types:

  • Single-assign attributes use non-set data types (e.g., mdex:long).
  • SET function transforms non-set data types into a set data type result (e.g., mdex:long-set).


  • NULL values are discarded.
  • If an attribute has both non-NULL and NULL values, only the non-NULL values are returned.
  • An empty set is returned if an attribute has no non-NULL values.
  • Duplicate values in an attribute are discarded.
  • Case-sensitive handling for string values, treating “Merlot” and “merlot” as distinct.
  • The order of values within a set is unspecified and unobservable.
  • Resulting Set:
    • The resulting set has a set data type (e.g., mdex:double-set).
    • Subsequent operations on the set must adhere to set rules.
  • Versions and Usage:
    • Available in one-argument and two-argument versions.
    • Can only be used in SELECT clauses.


Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top