Class AttributeMap<E>
java.lang.Object
org.elasticsearch.xpack.esql.core.expression.AttributeMap<E>
Dedicated map for checking
Attribute equality.
This is typically the case when comparing the initial declaration of an Attribute, such as FieldAttribute with
references to it, namely ReferenceAttribute.
Using plain object equality, the two references are difference due to their type however semantically, they are the same.
Expressions support semantic equality through Expression.semanticEquals(Expression) - this map is dedicated solution
for attributes as its common case picked up by the plan rules.
The map implementation is mutable thus consumers need to be careful NOT to modify the content unless they have ownership.
Worth noting the combine(AttributeMap), intersect(AttributeMap) and subtract(AttributeMap) methods which
return copies, decoupled from the input maps. In other words the returned maps can be modified without affecting the input or vice-versa.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> AttributeMap.Builder<E> builder()static <E> AttributeMap.Builder<E> builder(int expectedSize) voidclear()combine(AttributeMap<E> other) booleancontainsKey(Object key) booleancontainsValue(Object value) static <E> AttributeMap<E> entrySet()booleanvoidforEach(BiConsumer<? super Attribute, ? super E> action) getOrDefault(Object key, E defaultValue) inthashCode()intersect(AttributeMap<E> other) booleanisEmpty()keySet()static <E> AttributeMap<E> voidintsize()booleansubsetOf(AttributeMap<E> other) subtract(AttributeMap<E> other) toString()values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
AttributeMap
-
-
Method Details
-
emptyAttributeMap
-
combine
-
subtract
-
intersect
-
subsetOf
-
attributeNames
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<Attribute,E>
-
containsValue
- Specified by:
containsValuein interfaceMap<Attribute,E>
-
get
-
getOrDefault
- Specified by:
getOrDefaultin interfaceMap<Attribute,E>
-
resolve
-
resolve
-
put
-
putAll
-
remove
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
forEach
-
hashCode
public int hashCode() -
equals
-
toString
-
of
-
builder
-
builder
-