Interface RecordQueryPlan

    • Method Detail

      • getChildren

        @API(UNSTABLE)
        @Nonnull
        List<RecordQueryPlan> getChildren()
        Returns the (zero or more) RecordQueryPlan children of this plan.

        Warning: This part of the API is undergoing active development. At some point in the future, the return type of this method will change to allow it to return a list of generic QueryPlans. At current, every RecordQueryPlan can only have other RecordQueryPlans as children. However, this is not guaranteed to be the case in the future. This method has been marked as API.Status.UNSTABLE as of version 2.5.

        Returns:
        the child plans
      • getQueryPlanChildren

        @Nonnull
        default List<? extends QueryPlan<?>> getQueryPlanChildren()
        Description copied from interface: QueryPlan
        Returns the (zero or more) child QueryPlans of this plan. These children may or may not return elements of the same type as their parent plan.

        Warning: This part of the API is currently undergoing active development. At some point in the future, this will be renamed getChildren(). This cannot be done at current, however, as it would require an incompatible change to getChildren(). That method has been marked API.Status.UNSTABLE as of version 2.5.

        Specified by:
        getQueryPlanChildren in interface QueryPlan<FDBQueriedRecord<Message>>
        Returns:
        the child plans of this plan
      • structuralHashCode

        @API(EXPERIMENTAL)
        default int structuralHashCode()
        Return a hash code for this plan which is defined based on the structural layout of a plan. This differs from the semantic hash code defined in RelationalExpression. For instance this method would not necessarily return the same hash code for a union UNION(p1, p2) of two sub-plans p1 and p2 and it's reversed UNION(p2, p1). In contrast to that the semantic hash of these two plans is the same.
        Returns:
        a hash code for this objects that is defined on the structural layout of the plan
      • structuralEquals

        @API(EXPERIMENTAL)
        default boolean structuralEquals​(@Nullable
                                         Object other)
        Overloaded method to determine structural equality between two different plans using an empty AliasMap.
        Parameters:
        other - object to compare this object with
        Returns:
        true if this is structurally equal to other, false otherwise
      • structuralEquals

        @API(EXPERIMENTAL)
        default boolean structuralEquals​(@Nullable
                                         Object other,
                                         @Nonnull
                                         AliasMap equivalenceMap)
        Determine if two plans are structurally equal. This differs from the semantic equality defined in RelationalExpression. For instance this method would return false for two given plans UNION(p1, p2) and UNION(p2, p1) of two different sub-plans p1 and p2. In contrast to that these plans are considered semantically equal.
        Parameters:
        other - object to compare this object with
        equivalenceMap - alias map to indicate aliases that should be considered as equal when other is compared to this. For instance q1.x = 1 is only structurally equal with q2.x = 1 if there is a mapping q1 -> q2 in the alias map passed in
        Returns:
        true if this is structurally equal to other, false otherwise