Class PlanStreamInput
java.lang.Object
java.io.InputStream
org.elasticsearch.common.io.stream.StreamInput
org.elasticsearch.common.io.stream.FilterStreamInput
org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput
org.elasticsearch.xpack.esql.io.stream.PlanStreamInput
- All Implemented Interfaces:
Closeable,AutoCloseable,PlanStreamInput
public final class PlanStreamInput
extends NamedWriteableAwareStreamInput
implements PlanStreamInput
A customized stream input used to deserialize ESQL physical plan fragments. Complements stream
input with methods that read plan nodes, Attributes, Expressions, etc.
-
Field Summary
Fields inherited from class org.elasticsearch.common.io.stream.FilterStreamInput
delegate -
Constructor Summary
ConstructorsConstructorDescriptionPlanStreamInput(StreamInput streamInput, NamedWriteableRegistry namedWriteableRegistry, Configuration configuration) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()mapNameId(long l) <A extends Attribute>
AreadAttributeWithCache(org.elasticsearch.core.CheckedFunction<StreamInput, A, IOException> constructor) Read aBlockas part of the plan.Block[]Read an array ofBlocks as part of the plan.Reads a cached string, serialized withPlanStreamOutput.writeCachedString(String).<A extends EsField>
AMethods inherited from class org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput
namedWriteableRegistry, readNamedWriteable, readNamedWriteable, readNamedWriteableCollectionAsListMethods inherited from class org.elasticsearch.common.io.stream.FilterStreamInput
available, ensureCanReadBytes, getTransportVersion, read, read, readAllToReleasableBytesReference, readByte, readBytes, readInt, readLong, readReleasableBytesReference, readReleasableBytesReference, readShort, readSlicedBytesReference, readString, readVInt, readVLong, reset, setTransportVersion, supportReadAllToReleasableBytesReferenceMethods inherited from class org.elasticsearch.common.io.stream.StreamInput
doReadString, readArray, readArraySize, readBigInteger, readBoolean, readByteArray, readBytesRef, readBytesRef, readBytesReference, readBytesReference, readCollection, readCollectionAsImmutableList, readCollectionAsImmutableSet, readCollectionAsList, readCollectionAsSet, readDouble, readDoubleArray, readEnum, readEnumSet, readException, readFloat, readFloatArray, readFully, readGenericMap, readGenericValue, readGeoPoint, readImmutableMap, readImmutableMap, readImmutableOpenMap, readInstant, readIntArray, readLongArray, readMap, readMap, readMapOfLists, readMapValues, readOptional, readOptionalArray, readOptionalBoolean, readOptionalByteArray, readOptionalBytesReference, readOptionalCollectionAsList, readOptionalDouble, readOptionalEnum, readOptionalFloat, readOptionalFloatArray, readOptionalInstant, readOptionalInt, readOptionalLong, readOptionalNamedWriteable, readOptionalSecureString, readOptionalString, readOptionalStringArray, readOptionalStringCollectionAsList, readOptionalText, readOptionalTimeValue, readOptionalVInt, readOptionalVLong, readOptionalWriteable, readOptionalZoneId, readOrderedMap, readSecureString, readSlicedBytesReference, readStringArray, readStringCollectionAsImmutableList, readStringCollectionAsList, readText, readTimeValue, readVIntArray, readVIntSlow, readVLongArray, readVLongSlow, readZLong, readZoneId, throwEOF, throwOnBrokenVInt, throwOnBrokenVLong, throwOnNullRead, tryReadStringFromBytes, wrap, wrapMethods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, skip, skipNBytes, transferTo
-
Constructor Details
-
PlanStreamInput
public PlanStreamInput(StreamInput streamInput, NamedWriteableRegistry namedWriteableRegistry, Configuration configuration)
-
-
Method Details
-
configuration
- Throws:
IOException
-
readCachedBlock
Read aBlockas part of the plan.These
Blocks are not tracked byBlockFactoryand closing them does nothing so they should be small. We do make sure not to send duplicates, reusing blocks sent as part of theConfiguration.tables()if possible, otherwise sending a Block inline.- Throws:
IOException
-
readCachedBlockArray
Read an array ofBlocks as part of the plan.These
Blocks are not tracked byBlockFactoryand closing them does nothing so they should be small. We do make sure not to send duplicates, reusing blocks sent as part of theConfiguration.tables()if possible, otherwise sending a Block inline.- Throws:
IOException
-
sourceText
- Specified by:
sourceTextin interfacePlanStreamInput
-
mapNameId
- Specified by:
mapNameIdin interfacePlanStreamInput
-
readAttributeWithCache
public <A extends Attribute> A readAttributeWithCache(org.elasticsearch.core.CheckedFunction<StreamInput, A, throws IOExceptionIOException> constructor) - Specified by:
readAttributeWithCachein interfacePlanStreamInput- Parameters:
constructor- the constructor needed to build the actual attribute when read from the wire- Throws:
IOException
-
readEsFieldWithCache
- Specified by:
readEsFieldWithCachein interfacePlanStreamInput- Throws:
IOException
-
readCachedString
Reads a cached string, serialized withPlanStreamOutput.writeCachedString(String).- Specified by:
readCachedStringin interfacePlanStreamInput- Throws:
IOException
-
readOptionalCachedString
- Specified by:
readOptionalCachedStringin interfacePlanStreamInput- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterStreamInput- Throws:
IOException
-