Package org.apache.druid.frame.segment
Class FrameCursorUtils
java.lang.Object
org.apache.druid.frame.segment.FrameCursorUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DruidExceptionException to be thrown when the subquery's rows are too wide to fit in a single frame. -
Method Summary
Modifier and TypeMethodDescriptionstatic FilterbuildFilter(Filter filter, org.joda.time.Interval interval) cursorToFramesIterable(Cursor cursor, FrameWriterFactory frameWriterFactory) cursorToFramesSequence(Cursor cursor, FrameWriterFactory frameWriterFactory) static voidthrowIfColumnsHaveUnknownType(RowSignature rowSignature) ThrowsUnsupportedColumnTypeExceptionif the row signature has columns with unknown types.
-
Field Details
-
SUBQUERY_ROW_TOO_LARGE_EXCEPTION
Exception to be thrown when the subquery's rows are too wide to fit in a single frame. In such case, byte based limiting should be disabled or the user should modify the query.NOTE: This error message is not appropriate when a similar exception is hit in MSQ, since this workaround is not applicable in that scenario
-
-
Method Details
-
buildFilter
-
cursorToFramesIterable
public static Iterable<Frame> cursorToFramesIterable(Cursor cursor, FrameWriterFactory frameWriterFactory) Writes aCursorto a sequence ofFrame. This method iterates over the rows of the cursor, and writes the columns to the frames. The iterable is lazy, and it traverses the required portion of the cursor as required.If the type is missing from the signature, the method throws an exception without advancing/modifying/closing the cursor
-
cursorToFramesSequence
public static Sequence<Frame> cursorToFramesSequence(Cursor cursor, FrameWriterFactory frameWriterFactory) Writes aCursorto a sequence ofFrame. This method iterates over the rows of the cursor, and writes the columns to the frames- Parameters:
cursor- Cursor to write to the frameframeWriterFactory- Frame writer factory to write to the frame. It also determines the signature of the rows that are written to the frames
-
throwIfColumnsHaveUnknownType
ThrowsUnsupportedColumnTypeExceptionif the row signature has columns with unknown types. This is used to pre-determine if the frames can be materialized as rows, without touching the resource generating the frames.
-