core/src/main/java/org/apache/calcite/rel/metadata/RelMetadataQuery.java
/**
   * Returns the
   * {@link org.apache.calcite.rel.metadata.BuiltInMetadata.Collation#collations()}
   * statistic.
   *
   * @param rel         the relational expression
   * @return List of sorted column combinations, or
   * null if not enough information is available to make that determination
   */


@param rel         the relational expression
@return List of sorted column combinations, or
null if not enough information is available to make that determination
@param rel the relational expression @return List of sorted column combinations or null if not enough information is available to make that determination
public static ImmutableList<RelCollation> collations(RelNode rel) {
    final BuiltInMetadata.Collation metadata =
        rel.metadata(BuiltInMetadata.Collation.class);
    return metadata.collations();
  }
public static ImmutableList < RelCollation > collations ( RelNode rel ) { final BuiltInMetadata . Collation metadata = rel . metadata ( BuiltInMetadata . Collation . class ) ; return metadata . collations ( ) ; }
Returns the
 {@link org.apache.calcite.rel.metadata.BuiltInMetadata.Collation#collations()}
 statistic.
Returns the { @link org . apache . calcite . rel . metadata . BuiltInMetadata . Collation#collations () } statistic .