silundong commented on code in PR #4827:
URL: https://github.com/apache/calcite/pull/4827#discussion_r2902946420


##########
core/src/main/java/org/apache/calcite/plan/RelTraitSet.java:
##########
@@ -375,37 +389,67 @@ public RelTraitSet getDefaultSansConvention() {
    * {@link RelDistributionTraitDef#INSTANCE}, or null if the
    * {@link RelDistributionTraitDef#INSTANCE} is not registered
    * in this traitSet.
+   *
+   * <p>If multiple distribution values are present (a composite trait), the
+   * first one is returned. Use {@link #getTraits(RelTraitDef)} with
+   * {@link RelDistributionTraitDef#INSTANCE} to retrieve all values.
    */
   @SuppressWarnings("unchecked")
   public <T extends RelDistribution> @Nullable T getDistribution() {

Review Comment:
   If I understand correctly, `getTrait` and `getCollation` will throw an 
error, while `getDistribution` returns the first element. These are two 
different strategies. Can you please explain this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to