package rapids
- Alphabetic
- Public
- All
Type Members
- abstract class AbstractGpuCoalesceIterator extends Iterator[ColumnarBatch] with Arm with Logging
-
abstract
class
AbstractGpuJoinIterator extends Iterator[ColumnarBatch] with Arm with TaskAutoCloseableResource
Base class for iterators producing the results of a join.
-
class
AcceleratedColumnarToRowIterator extends Iterator[InternalRow] with Arm with Serializable
An iterator that uses the GPU for columnar to row conversion of fixed width types.
-
class
AddressSpaceAllocator extends AnyRef
Allocates blocks from an address space using a best-fit algorithm.
-
case class
AggAndReplace[T](agg: T, nullReplacePolicy: Option[ReplacePolicy]) extends Product with Serializable
For Scan and GroupBy Scan aggregations nulls are not always treated the same way as they are in window operations.
For Scan and GroupBy Scan aggregations nulls are not always treated the same way as they are in window operations. Often we have to run a post processing step and replace them. This groups those two together so we can have a complete picture of how to perform these types of aggregations.
-
abstract
class
AggExprMeta[INPUT <: AggregateFunction] extends ExprMeta[INPUT]
Base class for metadata around
AggregateFunction. -
case class
AggregateModeInfo(uniqueModes: Seq[AggregateMode], hasPartialMode: Boolean, hasPartialMergeMode: Boolean, hasFinalMode: Boolean, hasCompleteMode: Boolean) extends Product with Serializable
Utility class to convey information on the aggregation modes being used
-
case class
AllowSpillOnlyLazySpillableColumnarBatchImpl(wrapped: LazySpillableColumnarBatch) extends LazySpillableColumnarBatch with Arm with Product with Serializable
A version of
LazySpillableColumnarBatchwhere instead of closing the underlying batch it is only spilled.A version of
LazySpillableColumnarBatchwhere instead of closing the underlying batch it is only spilled. This is used for cases, like with a streaming hash join where the data itself needs to out live the JoinGatherer it is handed off to. -
case class
ApproxPercentileFromTDigestExpr(child: Expression, percentiles: Either[Double, Array[Double]], finalDataType: DataType) extends Expression with GpuExpression with ShimExpression with Product with Serializable
This expression computes an approximate percentile using a t-digest as input.
This expression computes an approximate percentile using a t-digest as input.
- child
Expression that produces the t-digests.
- percentiles
Percentile scalar, or percentiles array to evaluate.
- finalDataType
Data type for results
-
trait
Arm extends AnyRef
Implementation of the automatic-resource-management pattern
-
class
AutoCloseColumnBatchIterator[U] extends Iterator[ColumnarBatch]
For columnar code on the CPU it is the responsibility of the SparkPlan exec that creates a
ColumnarBatchto close it.For columnar code on the CPU it is the responsibility of the SparkPlan exec that creates a
ColumnarBatchto close it. In the case of code running on the GPU that would waste too much memory, so it is the responsibility of the code receiving the batch to close it, when it is not longer needed.This class provides a simple way for CPU batch code to be sure that a batch gets closed. If your code is executing on the GPU do not use this class.
- case class AvoidTransition[INPUT <: SparkPlan](plan: SparkPlanMeta[INPUT]) extends Optimization with Product with Serializable
-
class
AvroDataFileReader extends AvroFileReader
AvroDataFileReader reads the Avro file data in the iterator pattern.
AvroDataFileReader reads the Avro file data in the iterator pattern. You can use it as below. while(reader.hasNextBlock) { val b = reader.peekBlock estimateBufSize(b) // allocate the batch buffer reader.readNextRawBlock(buffer_as_out_stream) }
-
abstract
class
AvroFileReader extends AutoCloseable
The parent of the Rapids Avro file readers
-
class
AvroFileWriter extends AnyRef
AvroDataWriter, used to write a avro file header to the output stream.
-
class
AvroMetaFileReader extends AvroFileReader
AvroMetaFileReader collects the blocks' information from the Avro file without reading the block data.
- trait AvroProvider extends AnyRef
- abstract class BaseCrossJoinGatherMap extends LazySpillableGatherMap
-
abstract
class
BaseExprMeta[INPUT <: Expression] extends RapidsMeta[INPUT, Expression, Expression]
Base class for metadata around
Expression. -
trait
BasicWindowCalc extends Arm
Calculates the results of window operations.
Calculates the results of window operations. It assumes that any batching of the data or fixups after the fact to get the right answer is done outside of this.
-
class
BatchContext extends AnyRef
A context lives during the whole process of reading partitioned files to a batch buffer (aka HostMemoryBuffer) to build a memory file.
A context lives during the whole process of reading partitioned files to a batch buffer (aka HostMemoryBuffer) to build a memory file. Children can extend this to add more necessary fields.
-
abstract
class
BatchedBufferDecompressor extends AutoCloseable with Arm with Logging
Base class for batched decompressors
-
case class
BatchedByKey(gpuOrder: Seq[SortOrder])(cpuOrder: Seq[SortOrder]) extends CoalesceGoal with Product with Serializable
Split the data into batches where a set of keys are all within a single batch.
Split the data into batches where a set of keys are all within a single batch. This is generally used for things like a window operation or a sort based aggregation where you want all of the keys for a given operation to be available so the GPU can produce a correct answer. There is no limit on the target size so if there is a lot of data skew for a key, the batch may still run into limits on set by Spark or cudf. It should be noted that it is required that a node in the Spark plan that requires this should also require an input ordering that satisfies this ordering as well.
- gpuOrder
the GPU keys that should be used for batching.
- cpuOrder
the CPU keys that should be used for batching.
- class BatchedCopyCompressor extends BatchedTableCompressor
- class BatchedCopyDecompressor extends BatchedBufferDecompressor
- class BatchedNvcompLZ4Compressor extends BatchedTableCompressor
- class BatchedNvcompLZ4Decompressor extends BatchedBufferDecompressor
-
class
BatchedRunningWindowBinaryFixer extends BatchedRunningWindowFixer with Arm with Logging
This class fixes up batched running windows by performing a binary op on the previous value and those in the the same partition by key group.
This class fixes up batched running windows by performing a binary op on the previous value and those in the the same partition by key group. It does not deal with nulls, so it works for things like row_number and count, that cannot produce nulls, or for NULL_MIN and NULL_MAX that do the right thing when they see a null.
-
trait
BatchedRunningWindowFixer extends AutoCloseable
Provides a way to process running window operations without needing to buffer and split the batches on partition by boundaries.
Provides a way to process running window operations without needing to buffer and split the batches on partition by boundaries. When this happens part of a partition by key set may have been processed in the last batch, and the rest of it will need to be updated. For example if we are doing a running min operation. We may first get in something like
PARTS: 1, 1, 2, 2 VALUES: 2, 3, 10, 9The output of processing this would result in a new column that would look like
MINS: 2, 2, 10, 9But we don't know if the group with 2 in PARTS is done or not. So the fixer saved the last value in MINS, which is a 9. When the next batch shows up
PARTS: 2, 2, 3, 3 VALUES: 11, 5, 13, 14We generate the window result again and get
MINS: 11, 5, 13, 13But we cannot output this yet because there may have been overlap with the previous batch. The framework will figure that out and pass data into
fixUpto do the fixing. It will pass in MINS, and also a column of boolean valuestrue, true, false, falseto indicate which rows overlapped with the previous batch. In our min examplefixUpwill do a min between the last value in the previous batch and the values that could overlap with it.RESULT: 9, 5, 13, 13which can be output. -
abstract
class
BatchedTableCompressor extends AutoCloseable with Arm with Logging
Base class for batched compressors
-
abstract
class
BinaryAstExprMeta[INPUT <: BinaryExpression] extends BinaryExprMeta[INPUT]
Base metadata class for binary expressions that support conversion to AST
-
abstract
class
BinaryExprMeta[INPUT <: BinaryExpression] extends ExprMeta[INPUT]
Base class for metadata around
BinaryExpression. -
case class
BlockInfo(blockStart: Long, blockSize: Long, dataSize: Long, count: Long) extends Product with Serializable
The each Avro block information
The each Avro block information
- blockStart
the start of block
- blockSize
the whole block size = the size between two sync buffers + sync buffer
- dataSize
the block data size
- count
how many entries in this block
-
case class
BoundGpuWindowFunction(windowFunc: GpuWindowFunction, boundInputLocations: Array[Int]) extends Arm with Product with Serializable
The class represents a window function and the locations of its deduped inputs after an initial projection.
- class ByteArrayInputFile extends InputFile
- class CSVPartitionReader extends GpuTextBasedPartitionReader
- class CastChecks extends ExprChecks
-
final
class
CastExprMeta[INPUT <: CastBase] extends UnaryExprMeta[INPUT]
Meta-data for cast and ansi_cast.
- class CloseableHolder[T <: AutoCloseable] extends AnyRef
- case class ClouderaShimVersion(major: Int, minor: Int, patch: Int, clouderaVersion: String) extends ShimVersion with Product with Serializable
-
sealed abstract
class
CoalesceGoal extends Expression with GpuUnevaluable with ShimExpression
Provides a goal for batching of data.
- sealed abstract class CoalesceSizeGoal extends CoalesceGoal
- class CollectTimeIterator extends Iterator[ColumnarBatch]
-
class
ColumnarCopyHelper extends AnyRef
A helper class which efficiently transfers different types of host columnar data into cuDF.
A helper class which efficiently transfers different types of host columnar data into cuDF. It is written in Java for two reasons: 1. Scala for-loop is slower (Scala while-loop is identical to Java loop) 2. Both ColumnBuilder and ColumnVector are Java classes
-
trait
ColumnarFileFormat extends AnyRef
Used to write columnar data to files.
-
abstract
class
ColumnarOutputWriter extends HostBufferConsumer with Arm
This is used to write columnar data to a file system.
This is used to write columnar data to a file system. Subclasses of ColumnarOutputWriter must provide a zero-argument constructor. This is the columnar version of
org.apache.spark.sql.execution.datasources.OutputWriter. -
abstract
class
ColumnarOutputWriterFactory extends Serializable
A factory that produces ColumnarOutputWriters.
A factory that produces ColumnarOutputWriters. A new ColumnarOutputWriterFactory is created on the driver side, and then gets serialized to executor side to create ColumnarOutputWriters. This is the columnar version of
org.apache.spark.sql.execution.datasources.OutputWriterFactory. - case class ColumnarOverrideRules() extends ColumnarRule with Logging with Product with Serializable
-
class
ColumnarPartitionReaderWithPartitionValues extends PartitionReader[ColumnarBatch]
A wrapper reader that always appends partition values to the ColumnarBatch produced by the input reader
fileReader.A wrapper reader that always appends partition values to the ColumnarBatch produced by the input reader
fileReader. Each scalar value is splatted to a column with the same number of rows as the batch returned by the reader. - class ColumnarToRowIterator extends Iterator[InternalRow] with Arm
-
abstract
class
ComplexTypeMergingExprMeta[INPUT <: ComplexTypeMergingExpression] extends ExprMeta[INPUT]
Base class for metadata around
ComplexTypeMergingExpression. -
case class
CompressedTable(compressedSize: Long, meta: TableMeta, buffer: DeviceMemoryBuffer) extends AutoCloseable with Product with Serializable
Compressed table descriptor
Compressed table descriptor
- compressedSize
size of the compressed data in bytes
- meta
metadata describing the table layout when uncompressed
- buffer
buffer containing the compressed data
- class ConfBuilder extends AnyRef
- abstract class ConfEntry[T] extends AnyRef
- class ConfEntryWithDefault[T] extends ConfEntry[T]
-
case class
ContextChecks(outputCheck: TypeSig, sparkOutputSig: TypeSig, paramCheck: Seq[ParamCheck] = Seq.empty, repeatingParamCheck: Option[RepeatingParamCheck] = None) extends TypeChecks[Map[String, SupportLevel]] with Product with Serializable
Checks an expression that have input parameters and a single output.
Checks an expression that have input parameters and a single output. This is intended to be given for a specific ExpressionContext. If your expression does not meet this pattern you may need to create a custom ExprChecks instance.
-
class
CopyCompressionCodec extends TableCompressionCodec with Arm
A table compression codec used only for testing that copies the data.
-
class
CostBasedOptimizer extends Optimizer with Logging
Experimental cost-based optimizer that aims to avoid moving sections of the plan to the GPU when it would be better to keep that part of the plan on the CPU.
Experimental cost-based optimizer that aims to avoid moving sections of the plan to the GPU when it would be better to keep that part of the plan on the CPU. For example, we don't want to move data to the GPU just for a trivial projection and then have to move data back to the CPU on the next step.
-
trait
CostModel extends AnyRef
The cost model is behind a trait so that we can consider making this pluggable in the future so that users can override the cost model to suit specific use cases.
- class CpuCostModel extends CostModel
- final class CreateDataSourceTableAsSelectCommandMeta extends DataWritingCommandMeta[CreateDataSourceTableAsSelectCommand]
- trait CudfBinaryExpression extends BinaryExpression with GpuBinaryExpression
- abstract class CudfBinaryOperator extends BinaryOperator with GpuBinaryOperator with CudfBinaryExpression
-
class
CudfRegexTranspiler extends AnyRef
Transpile Java/Spark regular expression to a format that cuDF supports, or throw an exception if this is not possible.
- class CudfTDigestMerge extends CudfAggregate
- class CudfTDigestUpdate extends CudfAggregate
- trait CudfUnaryExpression extends GpuUnaryExpression
-
final
class
CudfUnsafeRow extends InternalRow
This is an InternalRow implementation based off of UnsafeRow, but follows a format for use with the row format supported by cudf.
This is an InternalRow implementation based off of UnsafeRow, but follows a format for use with the row format supported by cudf. In this format each column is padded to match the alignment needed by it, and validity is placed at the end one byte at a time.
It also supports remapping the columns so that if the columns were re-ordered to reduce packing in the format, then they can be mapped back to their original positions.
This class is likely to go away once we move to code generation when going directly to an UnsafeRow through code generation. This is rather difficult because of some details in how UnsafeRow works.
- case class CudfVersionMismatchException(errorMsg: String) extends PluginException with Product with Serializable
- trait DataBlockBase extends AnyRef
- trait DataFromReplacementRule extends AnyRef
-
class
DataTypeMeta extends AnyRef
The metadata around
DataType, which records the original data type, the desired data type for GPU overrides, and the reason of potential conversion.The metadata around
DataType, which records the original data type, the desired data type for GPU overrides, and the reason of potential conversion. The metadata is to ensure TypeChecks tagging the actual data types for GPU runtime, since data types of GPU overrides may slightly differ from original CPU counterparts. -
abstract
class
DataWritingCommandMeta[INPUT <: DataWritingCommand] extends RapidsMeta[INPUT, DataWritingCommand, GpuDataWritingCommand]
Base class for metadata around
DataWritingCommand. -
class
DataWritingCommandRule[INPUT <: DataWritingCommand] extends ReplacementRule[INPUT, DataWritingCommand, DataWritingCommandMeta[INPUT]]
Holds everything that is needed to replace a
DataWritingCommandwith a GPU enabled version. - case class DatabricksShimVersion(major: Int, minor: Int, patch: Int, dbver: String = "") extends ShimVersion with Product with Serializable
-
sealed
class
DegenerateRapidsBuffer extends RapidsBuffer with Arm
A buffer with no corresponding device data (zero rows or columns).
A buffer with no corresponding device data (zero rows or columns). These buffers are not tracked in buffer stores since they have no device memory. They are only tracked in the catalog and provide a representative
ColumnarBatchbut cannot provide aMemoryBuffer. -
class
DenseRankFixer extends BatchedRunningWindowFixer with Arm with Logging
Fix up dense rank batches.
Fix up dense rank batches. A dense rank has no gaps in the rank values. The rank corresponds to the ordering columns(s) equality. So when a batch finishes and another starts that split can either be at the beginning of a new order by section or part way through one. If it is at the beginning, then like row number we want to just add in the previous value and go on. If it was part way through, then we want to add in the previous value minus 1. The minus one is to pick up where we left off. If anything is outside of a continues partition by group then we just keep those values unchanged.
-
class
DeviceMemoryEventHandler extends RmmEventHandler with Logging
RMM event handler to trigger spilling from the device memory store.
- class DirectByteBufferFactory extends ByteBufferFactory
-
final
class
DoNotReplaceOrWarnSparkPlanMeta[INPUT <: SparkPlan] extends SparkPlanMeta[INPUT]
Metadata for
SparkPlanthat should not be replaced or have any kind of warning for -
class
DuplicateBufferException extends RuntimeException
Exception thrown when inserting a buffer into the catalog with a duplicate buffer ID and storage tier combination.
- case class EEPShimVersion(major: Int, minor: Int, patch: Int, ebfVer: Int, eep: String = "") extends ShimVersion with Product with Serializable
-
class
ExecChecks extends TypeChecks[Map[String, SupportLevel]]
Checks the input and output types supported by a SparkPlan node.
Checks the input and output types supported by a SparkPlan node. We don't currently separate input checks from output checks. We can add this in if something needs it.
The namedChecks map can be used to provide checks for specific groups of expressions.
-
class
ExecRule[INPUT <: SparkPlan] extends ReplacementRule[INPUT, SparkPlan, SparkPlanMeta[INPUT]]
Holds everything that is needed to replace a
SparkPlanwith a GPU enabled version. -
class
ExecutionPlanCaptureCallback extends QueryExecutionListener
Used as a part of testing to capture the executed query plan.
- trait ExplainPlanBase extends AnyRef
-
class
ExplainPlanImpl extends ExplainPlanBase
Note, this class should not be referenced directly in source code.
Note, this class should not be referenced directly in source code. It should be loaded by reflection using ShimLoader.newInstanceOf, see ./docs/dev/shims.md
- Attributes
- protected
-
abstract
class
ExprChecks extends TypeChecks[Map[ExpressionContext, Map[String, SupportLevel]]]
Base class all Expression checks must follow.
- case class ExprChecksImpl(contexts: Map[ExpressionContext, ContextChecks]) extends ExprChecks with Product with Serializable
- abstract class ExprMeta[INPUT <: Expression] extends BaseExprMeta[INPUT]
-
class
ExprRule[INPUT <: Expression] extends ReplacementRule[INPUT, Expression, BaseExprMeta[INPUT]]
Holds everything that is needed to replace an Expression with a GPU enabled version.
- sealed abstract class ExpressionContext extends AnyRef
-
trait
ExtraInfo extends AnyRef
A common trait for the extra information for different file format
-
class
FileFormatChecks extends TypeChecks[SupportLevel]
Checks for either a read or a write of a given file format.
- sealed trait FileFormatOp extends AnyRef
- sealed trait FileFormatType extends AnyRef
-
abstract
class
FilePartitionReaderBase extends PartitionReader[ColumnarBatch] with Logging with ScanWithMetrics with Arm
The base class for PartitionReader
- abstract class GeneratorExprMeta[INPUT <: Generator] extends ExprMeta[INPUT]
-
trait
GpuAggregateWindowFunction extends Expression with GpuWindowFunction
GPU Counterpart of
AggregateWindowFunction.GPU Counterpart of
AggregateWindowFunction. On the CPU this would extendDeclarativeAggregateand use the provided methods to build up the expressions need to produce a result. For window operations we do it in a single pass, where all of the data is available so instead we have out own set of expressions. - case class GpuAlias(child: Expression, name: String)(exprId: ExprId = NamedExpression.newExprId, qualifier: Seq[String] = Seq.empty, explicitMetadata: Option[Metadata] = None) extends GpuUnaryExpression with NamedExpression with Product with Serializable
-
case class
GpuApproximatePercentile(child: Expression, percentageExpression: GpuLiteral, accuracyExpression: GpuLiteral = ...) extends Expression with GpuAggregateFunction with Product with Serializable
The ApproximatePercentile function returns the approximate percentile(s) of a column at the given percentage(s).
The ApproximatePercentile function returns the approximate percentile(s) of a column at the given percentage(s). A percentile is a watermark value below which a given percentage of the column values fall. For example, the percentile of column
colat percentage 50% is the median of columncol.This function supports partial aggregation.
The GPU implementation uses t-digest to perform the initial aggregation (see
updateExpressions/mergeExpressions) and then applies theApproxPercentileFromTDigestExprexpression to compute percentiles from the final t-digest (seeevaluateExpression).There are two different data types involved here. The t-digests are a map of centroids (
Map[mean: Double -> weight: Double]) represented asList[Struct[Double, Double]]and the final output is either a single double or an array of doubles, depending on whether thepercentageExpressionparameter is a single value or an array.- child
child expression that can produce column value with
child.eval()- percentageExpression
Expression that represents a single percentage value or an array of percentage values. Each percentage value must be between 0.0 and 1.0.
- accuracyExpression
Integer literal expression of approximation accuracy. Higher value yields better accuracy, the default value is DEFAULT_PERCENTILE_ACCURACY.
- case class GpuArrayExists(argument: Expression, function: Expression, followThreeValuedLogic: Boolean, isBound: Boolean = false, boundIntermediate: Seq[GpuExpression] = Seq.empty) extends Expression with GpuArrayTransformBase with Product with Serializable
- case class GpuArrayTransform(argument: Expression, function: Expression, isBound: Boolean = false, boundIntermediate: Seq[GpuExpression] = Seq.empty) extends Expression with GpuArrayTransformBase with Product with Serializable
- trait GpuArrayTransformBase extends Expression with GpuSimpleHigherOrderFunction
-
case class
GpuAtLeastNNonNulls(n: Int, exprs: Seq[Expression]) extends Expression with GpuExpression with ShimExpression with Predicate with Product with Serializable
A GPU accelerated predicate that is evaluated to be true if there are at least
nnon-null and non-NaN values. - abstract class GpuBaseAggregateMeta[INPUT <: SparkPlan] extends SparkPlanMeta[INPUT]
-
trait
GpuBaseLimitExec extends SparkPlan with LimitExec with GpuExec with ShimUnaryExecNode
Helper trait which defines methods that are shared by both GpuLocalLimitExec and GpuGlobalLimitExec.
-
abstract
class
GpuBaseWindowExecMeta[WindowExecType <: SparkPlan] extends SparkPlanMeta[WindowExecType] with Logging
Base class for GPU Execs that implement window functions.
Base class for GPU Execs that implement window functions. This abstracts the method by which the window function's input expressions, partition specs, order-by specs, etc. are extracted from the specific WindowExecType.
- WindowExecType
The Exec class that implements window functions (E.g. o.a.s.sql.execution.window.WindowExec.)
- trait GpuBatchScanExecMetrics extends SparkPlan with GpuExec
-
trait
GpuBatchedRunningWindowWithFixer extends AnyRef
For many operations a running window (unbounded preceding to current row) can process the data without dividing the data up into batches that contain all of the data for a given group by key set.
For many operations a running window (unbounded preceding to current row) can process the data without dividing the data up into batches that contain all of the data for a given group by key set. Instead we store a small amount of state from a previous result and use it to fix the final result. This is a memory optimization.
- trait GpuBinaryExpression extends BinaryExpression with ShimBinaryExpression with GpuExpression
- trait GpuBinaryOperator extends BinaryOperator with GpuBinaryExpression
-
trait
GpuBind extends AnyRef
A trait that allows an Expression to control how it and its child expressions are bound.
A trait that allows an Expression to control how it and its child expressions are bound. This should be used with a lot of caution as binding can be really hard to debug if you get it wrong. The output of bind should have all instances of AttributeReference replaced with GpuBoundReference.
- case class GpuBoundReference(ordinal: Int, dataType: DataType, nullable: Boolean)(exprId: ExprId, name: String) extends GpuLeafExpression with ShimExpression with Product with Serializable
-
case class
GpuBringBackToHost(child: SparkPlan) extends SparkPlan with ShimUnaryExecNode with GpuExec with Product with Serializable
Pull back any data on the GPU to the host so the host can access it.
- case class GpuBroadcastHashJoinExec(leftKeys: Seq[Expression], rightKeys: Seq[Expression], joinType: JoinType, buildSide: GpuBuildSide, condition: Option[Expression], left: SparkPlan, right: SparkPlan) extends SparkPlan with ShimBinaryExecNode with GpuHashJoin with Product with Serializable
- class GpuBroadcastHashJoinMeta extends GpuBroadcastJoinMeta[BroadcastHashJoinExec]
- abstract class GpuBroadcastJoinMeta[INPUT <: SparkPlan] extends SparkPlanMeta[INPUT]
-
sealed abstract
class
GpuBuildSide extends AnyRef
Spark BuildSide, BuildRight, BuildLeft moved packages in Spark 3.1 so create GPU versions of these that can be agnostic to Spark version.
- case class GpuCSVPartitionReaderFactory(sqlConf: SQLConf, broadcastedConf: Broadcast[SerializableConfiguration], dataSchema: StructType, readDataSchema: StructType, partitionSchema: StructType, parsedOptions: CSVOptions, maxReaderBatchSizeRows: Integer, maxReaderBatchSizeBytes: Long, metrics: Map[String, GpuMetric], params: Map[String, String]) extends ShimFilePartitionReaderFactory with Product with Serializable
- case class GpuCSVScan(sparkSession: SparkSession, fileIndex: PartitioningAwareFileIndex, dataSchema: StructType, readDataSchema: StructType, readPartitionSchema: StructType, options: CaseInsensitiveStringMap, partitionFilters: Seq[Expression], dataFilters: Seq[Expression], maxReaderBatchSizeRows: Integer, maxReaderBatchSizeBytes: Long) extends TextBasedFileScan with ScanWithMetrics with Product with Serializable
- case class GpuCaseWhen(branches: Seq[(Expression, Expression)], elseValue: Option[Expression] = None) extends Expression with GpuConditionalExpression with Serializable with Product
-
case class
GpuCast(child: Expression, dataType: DataType, ansiMode: Boolean = false, timeZoneId: Option[String] = None, legacyCastToString: Boolean = false, stringToDateAnsiModeEnabled: Boolean = false) extends GpuUnaryExpression with TimeZoneAwareExpression with NullIntolerant with Product with Serializable
Casts using the GPU
-
case class
GpuCheckOverflow(child: Expression, dataType: DecimalType, nullOnOverflow: Boolean) extends GpuUnaryExpression with Product with Serializable
A GPU substitution for CheckOverflow.
A GPU substitution for CheckOverflow. This cannot match the Spark CheckOverflow 100% because Spark will calculate values in BigDecimal with unbounded precision and then see if there was an overflow. This will check bounds, but can only detect that an overflow happened if the result is outside the bounds of what the Spark type supports, but did not yet overflow the bounds for what the CUDF type supports. For most operations when this is a possibility for the given precision then the operator should fall back to the CPU, or have alternative ways of checking for overflow prior to this being called.
- case class GpuCoalesce(children: Seq[Expression]) extends Expression with GpuExpression with ShimExpression with ComplexTypeMergingExpression with Product with Serializable
- case class GpuCoalesceBatches(child: SparkPlan, goal: CoalesceGoal) extends SparkPlan with ShimUnaryExecNode with GpuExec with Product with Serializable
- case class GpuCoalesceExec(numPartitions: Int, child: SparkPlan) extends SparkPlan with ShimUnaryExecNode with GpuExec with Product with Serializable
- class GpuCoalesceIterator extends AbstractGpuCoalesceIterator with Arm
- class GpuCollectLimitMeta extends SparkPlanMeta[CollectLimitExec]
-
class
GpuColumnVector extends GpuColumnVectorBase
A GPU accelerated version of the Spark ColumnVector.
A GPU accelerated version of the Spark ColumnVector. Most of the standard Spark APIs should never be called, as they assume that the data is on the host, and we want to keep as much of the data on the device as possible. We also provide GPU accelerated versions of the transitions to and from rows.
-
final
class
GpuColumnVectorFromBuffer extends GpuColumnVector
GPU column vector carved from a single buffer, like those from cudf's contiguousSplit.
-
class
GpuColumnarBatchSerializer extends Serializer with Serializable
Serializer for serializing
ColumnarBatchs for use during normal shuffle.Serializer for serializing
ColumnarBatchs for use during normal shuffle.The serialization write path takes the cudf
Tablethat is described by theColumnarBatchand uses cudf APIs to serialize the data into a sequence of bytes on the host. The data is returned to the Spark shuffle code where it is compressed by the CPU and written to disk.The serialization read path is notably different. The sequence of serialized bytes IS NOT deserialized into a cudf
Tablebut rather tracked in host memory by aColumnarBatchthat contains a SerializedTableColumn. During query planning, each GPU columnar shuffle exchange is followed by a GpuShuffleCoalesceExec that expects to receive only these custom batches of SerializedTableColumn. GpuShuffleCoalesceExec coalesces the smaller shuffle partitions into larger tables before placing them on the GPU for further processing.- Note
The RAPIDS shuffle does not use this code.
- case class GpuColumnarToRowExec(child: SparkPlan, exportColumnarRdd: Boolean = false, postProjection: Seq[NamedExpression] = Seq.empty) extends SparkPlan with ShimUnaryExecNode with ColumnarToRowTransition with GpuExec with Product with Serializable
- trait GpuComplexTypeMergingExpression extends Expression with ComplexTypeMergingExpression with GpuExpression with ShimExpression
-
final
class
GpuCompressedColumnVector extends GpuColumnVectorBase with WithTableBuffer
A column vector that tracks a compressed table.
A column vector that tracks a compressed table. Unlike a normal GPU column vector, the columnar data within cannot be accessed directly. This class primarily serves the role of tracking the compressed data and table metadata so it can be decompressed later.
-
class
GpuCompressionAwareCoalesceIterator extends GpuCoalesceIterator
Compression codec-aware
GpuCoalesceIteratorsubclass which should be used in cases where the RAPIDS Shuffle Manager could be configured, as batches to be coalesced may be compressed. - trait GpuConditionalExpression extends Expression with ComplexTypeMergingExpression with GpuExpression with ShimExpression
- class GpuCostModel extends CostModel
-
trait
GpuDataWritingCommand extends LogicalPlan with DataWritingCommand with ShimUnaryCommand
An extension of
DataWritingCommandthat allows columnar execution. - case class GpuDataWritingCommandExec(cmd: GpuDataWritingCommand, child: SparkPlan) extends SparkPlan with ShimUnaryExecNode with GpuExec with Product with Serializable
-
case class
GpuDenseRank(children: Seq[Expression]) extends Expression with GpuRunningWindowFunction with GpuBatchedRunningWindowWithFixer with Product with Serializable
Dense Rank is a special window operation where it is only supported as a running window.
Dense Rank is a special window operation where it is only supported as a running window. In cudf it is only supported as a scan and a group by scan.
- children
the order by columns.
- Note
this is a running window only operator
- trait GpuExec extends SparkPlan with Arm
-
case class
GpuExpandExec(projections: Seq[Seq[Expression]], output: Seq[Attribute], child: SparkPlan) extends SparkPlan with ShimUnaryExecNode with GpuExec with Product with Serializable
Apply all of the GroupExpressions to every input row, hence we will get multiple output rows for an input row.
Apply all of the GroupExpressions to every input row, hence we will get multiple output rows for an input row.
- projections
The group of expressions, all of the group expressions should output the same schema specified bye the parameter
output- output
Attribute references to Output
- child
Child operator
- class GpuExpandExecMeta extends SparkPlanMeta[ExpandExec]
- class GpuExpandIterator extends Iterator[ColumnarBatch] with Arm
- case class GpuExplode(child: Expression) extends GpuExplodeBase with Product with Serializable
- abstract class GpuExplodeBase extends GpuUnevaluableUnaryExpression with GpuGenerator
-
trait
GpuExpression extends Expression with Arm
An Expression that cannot be evaluated in the traditional row-by-row sense (hence Unevaluable) but instead can be evaluated on an entire column batch at once.
- case class GpuFastSampleExec(lowerBound: Double, upperBound: Double, withReplacement: Boolean, seed: Long, child: SparkPlan) extends SparkPlan with ShimUnaryExecNode with GpuExec with Product with Serializable
- case class GpuFilterExec(condition: Expression, child: SparkPlan, coalesceAfter: Boolean = true) extends SparkPlan with ShimUnaryExecNode with GpuPredicateHelper with GpuExec with Product with Serializable
- case class GpuGenerateExec(generator: GpuGenerator, requiredChildOutput: Seq[Attribute], outer: Boolean, generatorOutput: Seq[Attribute], child: SparkPlan) extends SparkPlan with ShimUnaryExecNode with GpuExec with Product with Serializable
- class GpuGenerateExecSparkPlanMeta extends SparkPlanMeta[GenerateExec]
-
trait
GpuGenerator extends Expression with GpuUnevaluable
GPU overrides of
Generator, corporate withGpuGenerateExec. - case class GpuGetJsonObject(json: Expression, path: Expression) extends BinaryExpression with GpuBinaryExpression with ExpectsInputTypes with Product with Serializable
-
case class
GpuGlobalLimitExec(limit: Int, child: SparkPlan, offset: Int) extends SparkPlan with GpuBaseLimitExec with Product with Serializable
Take the first
limitelements of the child's single output partition. -
case class
GpuHashAggregateExec(requiredChildDistributionExpressions: Option[Seq[Expression]], groupingExpressions: Seq[NamedExpression], aggregateExpressions: Seq[GpuAggregateExpression], aggregateAttributes: Seq[Attribute], resultExpressions: Seq[NamedExpression], child: SparkPlan, configuredTargetBatchSize: Long) extends SparkPlan with ShimUnaryExecNode with GpuExec with Arm with Product with Serializable
The GPU version of HashAggregateExec
The GPU version of HashAggregateExec
- requiredChildDistributionExpressions
this is unchanged by the GPU. It is used in EnsureRequirements to be able to add shuffle nodes
- groupingExpressions
The expressions that, when applied to the input batch, return the grouping key
- aggregateExpressions
The GpuAggregateExpression instances for this node
- aggregateAttributes
References to each GpuAggregateExpression (attribute references)
- resultExpressions
the expected output expression of this hash aggregate (which this node should project)
- child
incoming plan (where we get input columns from)
- configuredTargetBatchSize
user-configured maximum device memory size of a batch
-
class
GpuHashAggregateIterator extends Iterator[ColumnarBatch] with Arm with AutoCloseable with Logging
Iterator that takes another columnar batch iterator as input and emits new columnar batches that are aggregated based on the specified grouping and aggregation expressions.
Iterator that takes another columnar batch iterator as input and emits new columnar batches that are aggregated based on the specified grouping and aggregation expressions. This iterator tries to perform a hash-based aggregation but is capable of falling back to a sort-based aggregation which can operate on data that is either larger than can be represented by a cudf column or larger than can fit in GPU memory.
The iterator starts by pulling all batches from the input iterator, performing an initial projection and aggregation on each individual batch via
aggregateInputBatches(). The resulting aggregated batches are cached in memory as spillable batches. Once all input batches have been aggregated,tryMergeAggregatedBatches()is called to attempt a merge of the aggregated batches into a single batch. If this is successful then the resulting batch can be returned, otherwisebuildSortFallbackIteratoris used to sort the aggregated batches by the grouping keys and performs a final merge aggregation pass on the sorted batches. - class GpuHashAggregateMeta extends GpuBaseAggregateMeta[HashAggregateExec]
-
case class
GpuHashAggregateMetrics(numOutputRows: GpuMetric, numOutputBatches: GpuMetric, numTasksFallBacked: GpuMetric, opTime: GpuMetric, computeAggTime: GpuMetric, concatTime: GpuMetric, sortTime: GpuMetric, semWaitTime: GpuMetric, spillCallback: SpillCallback) extends Product with Serializable
Utility class to hold all of the metrics related to hash aggregation
- abstract class GpuHashPartitioningBase extends Expression with GpuExpression with ShimExpression with GpuPartitioning with Serializable
-
trait
GpuHigherOrderFunction extends Expression with GpuExpression with ShimExpression
A higher order function takes one or more (lambda) functions and applies these to some objects.
A higher order function takes one or more (lambda) functions and applies these to some objects. The function produces a number of variables which can be consumed by some lambda function.
- case class GpuIf(predicateExpr: Expression, trueExpr: Expression, falseExpr: Expression) extends Expression with GpuConditionalExpression with Product with Serializable
- case class GpuInSet(child: Expression, list: Seq[Any]) extends GpuUnaryExpression with Predicate with Product with Serializable
- case class GpuIsNan(child: Expression) extends GpuUnaryExpression with Predicate with Product with Serializable
- case class GpuIsNotNull(child: Expression) extends GpuUnaryExpression with Predicate with Product with Serializable
- case class GpuIsNull(child: Expression) extends GpuUnaryExpression with Predicate with Product with Serializable
-
class
GpuKeyBatchingIterator extends Iterator[ColumnarBatch] with Arm
Given a stream of data that is sorted by a set of keys, split the data so each batch output contains all of the keys for a given key set.
Given a stream of data that is sorted by a set of keys, split the data so each batch output contains all of the keys for a given key set. This tries to get the batch sizes close to the target size. It assumes that the input batches will already be close to that size and does not try to split them too much further.
-
case class
GpuKnownFloatingPointNormalized(child: Expression) extends UnaryExpression with ShimTaggingExpression with GpuExpression with Product with Serializable
This is a TaggingExpression in spark, which gets matched in NormalizeFloatingNumbers (which is a Rule).
-
case class
GpuKnownNotNull(child: Expression) extends UnaryExpression with ShimTaggingExpression with GpuExpression with Product with Serializable
GPU version of the 'KnownNotNull', a TaggingExpression in spark, to tag an expression as known to not be null.
- class GpuKryoRegistrator extends KryoRegistrator
- case class GpuLag(input: Expression, offset: Expression, default: Expression) extends Expression with GpuOffsetWindowFunction with Product with Serializable
-
case class
GpuLambdaFunction(function: Expression, arguments: Seq[NamedExpression], hidden: Boolean = false) extends Expression with GpuExpression with ShimExpression with Product with Serializable
A lambda function and its arguments on the GPU.
A lambda function and its arguments on the GPU. This is mostly just a wrapper around the function expression, but it holds references to the arguments passed into it.
- case class GpuLead(input: Expression, offset: Expression, default: Expression) extends Expression with GpuOffsetWindowFunction with Product with Serializable
- abstract class GpuLeafExpression extends Expression with GpuExpression with ShimExpression
-
case class
GpuLiteral(value: Any, dataType: DataType) extends GpuLeafExpression with Product with Serializable
In order to do type conversion and checking, use GpuLiteral.create() instead of constructor.
-
case class
GpuLocalLimitExec(limit: Int, child: SparkPlan) extends SparkPlan with GpuBaseLimitExec with Product with Serializable
Take the first
limitelements of each child partition, but do not collect or shuffle them. - case class GpuMakeDecimal(child: Expression, precision: Int, sparkScale: Int, nullOnOverflow: Boolean) extends GpuUnaryExpression with Product with Serializable
- case class GpuMapFilter(argument: Expression, function: Expression, isBound: Boolean = false, boundIntermediate: Seq[GpuExpression] = Seq.empty) extends Expression with GpuMapSimpleHigherOrderFunction with Product with Serializable
- trait GpuMapSimpleHigherOrderFunction extends Expression with GpuSimpleHigherOrderFunction with GpuBind
- sealed abstract class GpuMetric extends Serializable
-
case class
GpuMonotonicallyIncreasingID() extends GpuLeafExpression with Product with Serializable
An expression that returns monotonically increasing 64-bit integers just like
org.apache.spark.sql.catalyst.expressions.MonotonicallyIncreasingIDAn expression that returns monotonically increasing 64-bit integers just like
org.apache.spark.sql.catalyst.expressions.MonotonicallyIncreasingIDThe generated ID is guaranteed to be monotonically increasing and unique, but not consecutive. This implementations should match what spark does which is to put the partition ID in the upper 31 bits, and the lower 33 bits represent the record number within each partition.
- case class GpuNaNvl(left: Expression, right: Expression) extends BinaryExpression with GpuBinaryExpression with Product with Serializable
-
case class
GpuNamedLambdaVariable(name: String, dataType: DataType, nullable: Boolean, exprId: ExprId = NamedExpression.newExprId) extends GpuLeafExpression with NamedExpression with GpuUnevaluable with Product with Serializable
A named lambda variable.
A named lambda variable. In Spark on the CPU this includes an AtomicReference to the value that is updated each time a lambda function is called. On the GPU we have to bind this and turn it into a GpuBoundReference for a modified input batch. In the future this should also work with AST when cudf supports that type of operation.
- class GpuObjectHashAggregateExecMeta extends GpuTypedImperativeSupportedAggregateExecMeta[ObjectHashAggregateExec]
- trait GpuOffsetWindowFunction extends Expression with GpuAggregateWindowFunction
-
case class
GpuOrcMultiFilePartitionReaderFactory(sqlConf: SQLConf, broadcastedConf: Broadcast[SerializableConfiguration], dataSchema: StructType, readDataSchema: StructType, partitionSchema: StructType, filters: Array[Filter], rapidsConf: RapidsConf, metrics: Map[String, GpuMetric], queryUsesInputFile: Boolean) extends MultiFilePartitionReaderFactoryBase with Product with Serializable
The multi-file partition reader factory for creating cloud reading or coalescing reading for ORC file format.
The multi-file partition reader factory for creating cloud reading or coalescing reading for ORC file format.
- sqlConf
the SQLConf
- broadcastedConf
the Hadoop configuration
- dataSchema
schema of the data
- readDataSchema
the Spark schema describing what will be read
- partitionSchema
schema of partitions.
- filters
filters on non-partition columns
- rapidsConf
the Rapids configuration
- metrics
the metrics
- queryUsesInputFile
this is a parameter to easily allow turning it off in GpuTransitionOverrides if InputFileName, InputFileBlockStart, or InputFileBlockLength are used
-
class
GpuOrcPartitionReader extends FilePartitionReaderBase with OrcPartitionReaderBase
A PartitionReader that reads an ORC file split on the GPU.
A PartitionReader that reads an ORC file split on the GPU.
Efficiently reading an ORC split on the GPU requires rebuilding the ORC file in memory such that only relevant data is present in the memory file. This avoids sending unnecessary data to the GPU and saves GPU memory.
- case class GpuOrcPartitionReaderFactory(sqlConf: SQLConf, broadcastedConf: Broadcast[SerializableConfiguration], dataSchema: StructType, readDataSchema: StructType, partitionSchema: StructType, pushedFilters: Array[Filter], rapidsConf: RapidsConf, metrics: Map[String, GpuMetric], params: Map[String, String]) extends ShimFilePartitionReaderFactory with Arm with Product with Serializable
- case class GpuOrcScan(sparkSession: SparkSession, hadoopConf: Configuration, fileIndex: PartitioningAwareFileIndex, dataSchema: StructType, readDataSchema: StructType, readPartitionSchema: StructType, options: CaseInsensitiveStringMap, pushedFilters: Array[Filter], partitionFilters: Seq[Expression], dataFilters: Seq[Expression], rapidsConf: RapidsConf, queryUsesInputFile: Boolean = false) extends ScanWithMetrics with FileScan with Logging with Product with Serializable
-
case class
GpuOutOfCoreSortIterator(iter: Iterator[ColumnarBatch], sorter: GpuSorter, cpuOrd: LazilyGeneratedOrdering, targetSize: Long, opTime: GpuMetric, sortTime: GpuMetric, outputBatches: GpuMetric, outputRows: GpuMetric, peakDevMemory: GpuMetric, spillCallback: SpillCallback) extends Iterator[ColumnarBatch] with Arm with AutoCloseable with Product with Serializable
Sorts incoming batches of data spilling if needed.
Sorts incoming batches of data spilling if needed.
The algorithm for this is a modified version of an external merge sort with multiple passes for large data. https://en.wikipedia.org/wiki/External_sorting#External_merge_sort
The main difference is that we cannot stream the data when doing a merge sort. So, we instead divide the data into batches that are small enough that we can do a merge sort on N batches and still fit the output within the target batch size. When merging batches instead of individual rows we cannot assume that all of the resulting data is globally sorted. Hopefully, most of it is globally sorted but we have to use the first row from the next pending batch to determine the cutoff point between globally sorted data and data that still needs to be merged with other batches. The globally sorted portion is put into a sorted queue while the rest of the merged data is split and put back into a pending queue. The process repeats until we have enough data to output. - case class GpuOverrides() extends Rule[SparkPlan] with Logging with Product with Serializable
-
trait
GpuOverridesListener extends AnyRef
Listener trait so that tests can confirm that the expected optimizations are being applied
-
final
class
GpuPackedTableColumn extends GpuColumnVectorBase with WithTableBuffer
A GPU column tracking a packed table such as one generated by contiguous split.
A GPU column tracking a packed table such as one generated by contiguous split. Unlike
GpuColumnVectorFromBuffer, the columnar data cannot be accessed directly.This class primarily serves the role of tracking the packed table data in a ColumnarBatch without requiring the underlying table to be manifested along with all of the child columns. The typical use-case generates one of these columns per task output partition, and then the RAPIDS shuffle transmits the opaque host metadata and GPU data buffer to another host.
NOTE: There should only be one instance of this column per ColumnarBatch as the
- class GpuParquetFileFormat extends ColumnarFileFormat with Logging
-
case class
GpuParquetMultiFilePartitionReaderFactory(sqlConf: SQLConf, broadcastedConf: Broadcast[SerializableConfiguration], dataSchema: StructType, readDataSchema: StructType, partitionSchema: StructType, filters: Array[Filter], rapidsConf: RapidsConf, metrics: Map[String, GpuMetric], queryUsesInputFile: Boolean) extends MultiFilePartitionReaderFactoryBase with Product with Serializable
Similar to GpuParquetPartitionReaderFactory but extended for reading multiple files in an iteration.
Similar to GpuParquetPartitionReaderFactory but extended for reading multiple files in an iteration. This will allow us to read multiple small files and combine them on the CPU side before sending them down to the GPU.
- case class GpuParquetPartitionReaderFactory(sqlConf: SQLConf, broadcastedConf: Broadcast[SerializableConfiguration], dataSchema: StructType, readDataSchema: StructType, partitionSchema: StructType, filters: Array[Filter], rapidsConf: RapidsConf, metrics: Map[String, GpuMetric], params: Map[String, String]) extends ShimFilePartitionReaderFactory with Arm with Logging with Product with Serializable
-
case class
GpuParquetScan(sparkSession: SparkSession, hadoopConf: Configuration, fileIndex: PartitioningAwareFileIndex, dataSchema: StructType, readDataSchema: StructType, readPartitionSchema: StructType, pushedFilters: Array[Filter], options: CaseInsensitiveStringMap, partitionFilters: Seq[Expression], dataFilters: Seq[Expression], rapidsConf: RapidsConf, queryUsesInputFile: Boolean = false) extends ScanWithMetrics with FileScan with Logging with Product with Serializable
Base GpuParquetScan used for common code across Spark versions.
Base GpuParquetScan used for common code across Spark versions. Gpu version of Spark's 'ParquetScan'.
- sparkSession
SparkSession.
- hadoopConf
Hadoop configuration.
- fileIndex
File index of the relation.
- dataSchema
Schema of the data.
- readDataSchema
Schema to read.
- readPartitionSchema
Partition schema.
- pushedFilters
Filters on non-partition columns.
- options
Parquet option settings.
- partitionFilters
Filters on partition columns.
- dataFilters
File source metadata filters.
- rapidsConf
Rapids configuration.
- queryUsesInputFile
This is a parameter to easily allow turning it off in GpuTransitionOverrides if InputFileName, InputFileBlockStart, or InputFileBlockLength are used
- class GpuParquetWriter extends ColumnarOutputWriter
- trait GpuPartitioning extends Partitioning with Arm
-
case class
GpuPercentRank(children: Seq[Expression]) extends Expression with GpuRunningWindowFunction with Product with Serializable
percent_rank() is a running window function in that it only operates on a window of unbounded preceding to current row.
percent_rank() is a running window function in that it only operates on a window of unbounded preceding to current row. But, an entire window has to be in the batch because the rank is divided by the number of entries in the window to get the percent rank. We cannot know the number of entries in the window without the entire window. This is why it is not a
GpuBatchedRunningWindowWithFixer. - case class GpuPosExplode(child: Expression) extends GpuExplodeBase with Product with Serializable
-
case class
GpuProjectAstExec(projectList: List[Expression], child: SparkPlan) extends SparkPlan with ShimUnaryExecNode with GpuExec with Product with Serializable
Use cudf AST expressions to project columnar batches
- case class GpuProjectExec(projectList: List[NamedExpression], child: SparkPlan) extends SparkPlan with ShimUnaryExecNode with GpuExec with Product with Serializable
- class GpuProjectExecMeta extends SparkPlanMeta[ProjectExec] with Logging
-
case class
GpuPromotePrecision(child: Expression) extends GpuUnaryExpression with Product with Serializable
A GPU substitution of PromotePrecision, which is a NOOP in Spark too.
-
case class
GpuQueryStagePrepOverrides() extends Rule[SparkPlan] with Logging with Product with Serializable
Tag the initial plan when AQE is enabled
-
case class
GpuRangeExec(start: Long, end: Long, step: Long, numSlices: Int, output: Seq[Attribute], targetSizeBytes: Long) extends SparkPlan with LeafExecNode with GpuExec with Product with Serializable
Physical plan for range (generating a range of 64 bit numbers).
- case class GpuRangePartitioner(rangeBounds: Array[InternalRow], sorter: GpuSorter) extends Expression with GpuExpression with ShimExpression with GpuPartitioning with Product with Serializable
-
case class
GpuRank(children: Seq[Expression]) extends Expression with GpuRunningWindowFunction with GpuBatchedRunningWindowWithFixer with ShimExpression with Product with Serializable
Rank is a special window operation where it is only supported as a running window.
Rank is a special window operation where it is only supported as a running window. In cudf it is only supported as a scan and a group by scan. But there are special requirements beyond that when doing the computation as a running batch. To fix up each batch it needs both the rank and the row number. To make this work and be efficient there is different behavior for batched running window vs non-batched. If it is for a running batch we include the row number values, in both the initial projections and in the corresponding aggregations. Then we combine them into a struct column in
scanCombinebefore it is passed on to theRankFixer. If it is not a running batch, then we drop the row number part because it is just not needed.- children
the order by columns.
- Note
this is a running window only operator.
-
class
GpuReadCSVFileFormat extends CSVFileFormat with GpuReadFileFormatWithMetrics
A FileFormat that allows reading CSV files with the GPU.
- trait GpuReadFileFormatWithMetrics extends FileFormat
-
class
GpuReadOrcFileFormat extends OrcFileFormat with GpuReadFileFormatWithMetrics
A FileFormat that allows reading ORC files with the GPU.
-
class
GpuReadParquetFileFormat extends ParquetFileFormat with GpuReadFileFormatWithMetrics
A FileFormat that allows reading Parquet files with the GPU.
- class GpuRegExpReplaceMeta extends QuaternaryExprMeta[RegExpReplace]
-
trait
GpuReplaceWindowFunction extends Expression with GpuWindowFunction
This is a special window function that simply replaces itself with one or more window functions and other expressions that can be executed.
This is a special window function that simply replaces itself with one or more window functions and other expressions that can be executed. This allows you to write
GpuAveragein terms ofGpuSumandGpuCountwhich can both operate on all window optimizations makingGpuAveragebe able to do the same. - case class GpuReplicateRows(children: Seq[Expression]) extends Expression with GpuGenerator with ShimExpression with Product with Serializable
-
case class
GpuRoundRobinPartitioning(numPartitions: Int) extends Expression with GpuExpression with ShimExpression with GpuPartitioning with Product with Serializable
Represents a partitioning where incoming columnar batched rows are distributed evenly across output partitions by starting from a zero-th partition number and distributing rows in a round-robin fashion.
Represents a partitioning where incoming columnar batched rows are distributed evenly across output partitions by starting from a zero-th partition number and distributing rows in a round-robin fashion. This partitioning is used when implementing the DataFrame.repartition() operator.
-
trait
GpuRowBasedUserDefinedFunction extends Expression with GpuExpression with ShimExpression with UserDefinedExpression with Serializable with Logging
Execute a row based UDF efficiently by pulling back only the columns the UDF needs to host and do the processing on CPU.
-
case class
GpuRowToColumnarExec(child: SparkPlan, goal: CoalesceSizeGoal, preProcessing: Seq[NamedExpression] = Seq.empty) extends SparkPlan with ShimUnaryExecNode with GpuExec with Product with Serializable
GPU version of row to columnar transition.
- case class GpuRunningWindowExec(windowOps: Seq[NamedExpression], gpuPartitionSpec: Seq[Expression], gpuOrderSpec: Seq[SortOrder], child: SparkPlan)(cpuPartitionSpec: Seq[Expression], cpuOrderSpec: Seq[SortOrder]) extends SparkPlan with GpuWindowBaseExec with Product with Serializable
-
trait
GpuRunningWindowFunction extends Expression with GpuWindowFunction
A window function that is optimized for running windows using the cudf scan and group by scan operations.
A window function that is optimized for running windows using the cudf scan and group by scan operations. In some cases, like row number and rank, Spark only supports them as running window operations. This is why it directly extends GpuWindowFunction because it can be a stand alone window function. In all other cases it should be combined with GpuAggregateWindowFunction to provide a fully functional window operation. It should be noted that WindowExec tries to deduplicate input projections and aggregations to reduce memory usage. Because of tracking requirements it is required that there is a one to one relationship between an input projection and a corresponding aggregation.
-
class
GpuRunningWindowIterator extends Iterator[ColumnarBatch] with BasicWindowCalc
An iterator that can do row based aggregations on running window queries (Unbounded preceding to current row) if and only if the aggregations are instances of GpuBatchedRunningWindowFunction which can fix up the window output when an aggregation is only partly done in one batch of data.
An iterator that can do row based aggregations on running window queries (Unbounded preceding to current row) if and only if the aggregations are instances of GpuBatchedRunningWindowFunction which can fix up the window output when an aggregation is only partly done in one batch of data. Because of this there is no requirement about how the input data is batched, but it must be sorted by both partitioning and ordering.
- case class GpuSampleExec(lowerBound: Double, upperBound: Double, withReplacement: Boolean, seed: Long, child: SparkPlan) extends SparkPlan with ShimUnaryExecNode with GpuExec with Product with Serializable
- class GpuSampleExecMeta extends SparkPlanMeta[SampleExec] with Logging
-
class
GpuScalar extends Arm with AutoCloseable
The wrapper of a Scala value and its corresponding cudf Scalar, along with its DataType.
The wrapper of a Scala value and its corresponding cudf Scalar, along with its DataType.
This class is introduced because many expressions require both the cudf Scalar and its corresponding Scala value to complete their computations. e.g. 'GpuStringSplit', 'GpuStringLocate', 'GpuDivide', 'GpuDateAddInterval', 'GpuTimeMath' ... So only either a cudf Scalar or a Scala value can not support such cases, unless copying data between the host and the device each time being asked for.
This GpuScalar can be created from either a cudf Scalar or a Scala value. By initializing the cudf Scalar or the Scala value lazily and caching them after being created, it can reduce the unnecessary data copies.
If a GpuScalar is created from a Scala value and is used only on the host side, there will be no data copy and no cudf Scalar created. And if it is used on the device side, only need to copy data to the device once to create a cudf Scalar.
Similarly, if a GpuScalar is created from a cudf Scalar, no need to copy data to the host if it is used only on the device side (This is the ideal case we like, since all is on the GPU). And only need to copy the data to the host once if it is used on the host side.
So a GpuScalar will have at most one data copy but support all the cases. No round-trip happens.
Another reason why storing the Scala value in addition to the cudf Scalar is
GpuDateAddIntervaland 'GpuTimeMath' have different algorithms with the 3 members of aCalendarInterval, which can not be supported by a single cudf Scalar now.Do not create a GpuScalar from the constructor, instead call the factory APIs above.
-
case class
GpuShuffleCoalesceExec(child: SparkPlan, targetBatchByteSize: Long) extends SparkPlan with ShimUnaryExecNode with GpuExec with Product with Serializable
Coalesces serialized tables on the host up to the target batch size before transferring the coalesced result to the GPU.
Coalesces serialized tables on the host up to the target batch size before transferring the coalesced result to the GPU. This reduces the overhead of copying data to the GPU and also helps avoid holding onto the GPU semaphore while shuffle I/O is being performed.
- Note
This should ALWAYS appear in the plan after a GPU shuffle when RAPIDS shuffle is not being used.
-
class
GpuShuffleCoalesceIterator extends Iterator[ColumnarBatch] with Arm
Iterator that coalesces columnar batches that are expected to only contain SerializedTableColumn.
Iterator that coalesces columnar batches that are expected to only contain SerializedTableColumn. The serialized tables within are collected up to the target batch size and then concatenated on the host before the data is transferred to the GPU.
- case class GpuShuffledHashJoinExec(leftKeys: Seq[Expression], rightKeys: Seq[Expression], joinType: JoinType, buildSide: GpuBuildSide, condition: Option[Expression], left: SparkPlan, right: SparkPlan, isSkewJoin: Boolean)(cpuLeftKeys: Seq[Expression], cpuRightKeys: Seq[Expression]) extends SparkPlan with ShimBinaryExecNode with GpuHashJoin with Product with Serializable
- class GpuShuffledHashJoinMeta extends SparkPlanMeta[ShuffledHashJoinExec]
-
trait
GpuSimpleHigherOrderFunction extends Expression with GpuHigherOrderFunction with GpuBind
Trait for functions having as input one argument and one function.
- class GpuSortAggregateExecMeta extends GpuTypedImperativeSupportedAggregateExecMeta[SortAggregateExec]
- case class GpuSortEachBatchIterator(iter: Iterator[ColumnarBatch], sorter: GpuSorter, singleBatch: Boolean, opTime: GpuMetric = NoopMetric, sortTime: GpuMetric = NoopMetric, outputBatches: GpuMetric = NoopMetric, outputRows: GpuMetric = NoopMetric, peakDevMemory: GpuMetric = NoopMetric) extends Iterator[ColumnarBatch] with Arm with Product with Serializable
- case class GpuSortExec(gpuSortOrder: Seq[SortOrder], global: Boolean, child: SparkPlan, sortType: SortExecType)(cpuSortOrder: Seq[SortOrder]) extends SparkPlan with ShimUnaryExecNode with GpuExec with Product with Serializable
- class GpuSortMergeJoinMeta extends SparkPlanMeta[SortMergeJoinExec]
- class GpuSortMeta extends SparkPlanMeta[SortExec]
-
class
GpuSorter extends Arm with Serializable
A class that provides convenience methods for sorting batches of data.
A class that provides convenience methods for sorting batches of data. A Spark SortOrder typically will just reference a single column using an AttributeReference. This is the simplest situation so we just need to bind the attribute references to where they go, but it is possible that some computation can be done in the SortOrder. This would be a situation like sorting strings by their length instead of in lexicographical order. Because cudf does not support this directly we instead go through the SortOrder instances that are a part of this sorter and find the ones that require computation. We then do the sort in a few stages first we compute any needed columns from the SortOrder instances that require some computation, and add them to the original batch. The method
appendProjectedColumnsdoes this. This then provides a number of methods that can be used to operate on a batch that has these new columns added to it. These include sorting, merge sorting, and finding bounds. These can be combined in various ways to do different algorithms. When you are done with these different operations you can drop the temporary columns that were added, just for computation, usingremoveProjectedColumns. Some times you may want to pull data back to the CPU and sort rows there too. We providecpuOrdersthat lets you do this on rows that have had the extra ordering columns added to them. This also providesfullySortBatchas an optimization. If all you want to do is sort a batch you don't want to have to sort the temp columns too, and this provide that. -
case class
GpuSparkPartitionID() extends GpuLeafExpression with Product with Serializable
An expression that returns the current partition id just like
org.apache.spark.sql.catalyst.expressions.SparkPartitionID - case class GpuSpecialFrameBoundary(boundary: SpecialFrameBoundary) extends Expression with GpuExpression with ShimExpression with GpuUnevaluable with Product with Serializable
- case class GpuSpecifiedWindowFrame(frameType: FrameType, lower: Expression, upper: Expression) extends Expression with GpuWindowFrame with Product with Serializable
- abstract class GpuSpecifiedWindowFrameMetaBase extends ExprMeta[SpecifiedWindowFrame]
- trait GpuString2TrimExpression extends Expression with String2TrimExpression with GpuExpression with ShimExpression
- trait GpuTernaryExpression extends TernaryExpression with ShimTernaryExpression with GpuExpression
-
abstract
class
GpuTextBasedPartitionReader extends PartitionReader[ColumnarBatch] with ScanWithMetrics with Arm
The text based PartitionReader
-
case class
GpuTopN(limit: Int, gpuSortOrder: Seq[SortOrder], projectList: Seq[NamedExpression], child: SparkPlan)(cpuSortOrder: Seq[SortOrder]) extends SparkPlan with GpuExec with ShimUnaryExecNode with Product with Serializable
Take the first limit elements as defined by the sortOrder, and do projection if needed.
Take the first limit elements as defined by the sortOrder, and do projection if needed. This is logically equivalent to having a Limit operator after a
SortExecoperator, or having aProjectExecoperator between them. This could have been named TopK, but Spark's top operator does the opposite in ordering so we name it TakeOrdered to avoid confusion. - case class GpuTransformKeys(argument: Expression, function: Expression, isBound: Boolean = false, boundIntermediate: Seq[GpuExpression] = Seq.empty) extends Expression with GpuMapSimpleHigherOrderFunction with Product with Serializable
- case class GpuTransformValues(argument: Expression, function: Expression, isBound: Boolean = false, boundIntermediate: Seq[GpuExpression] = Seq.empty) extends Expression with GpuMapSimpleHigherOrderFunction with Product with Serializable
-
class
GpuTransitionOverrides extends Rule[SparkPlan]
Rules that run after the row to columnar and columnar to row transitions have been inserted.
Rules that run after the row to columnar and columnar to row transitions have been inserted. These rules insert transitions to and from the GPU, and then optimize various transitions.
-
abstract
class
GpuTypedImperativeSupportedAggregateExecMeta[INPUT <: BaseAggregateExec] extends GpuBaseAggregateMeta[INPUT]
Base class for metadata around
SortAggregateExecandObjectHashAggregateExec, which may contain TypedImperativeAggregate functions in aggregate expressions. - abstract class GpuUnaryExpression extends UnaryExpression with ShimUnaryExpression with GpuExpression
- trait GpuUnevaluable extends Expression with GpuExpression
- abstract class GpuUnevaluableUnaryExpression extends GpuUnaryExpression with GpuUnevaluable
- case class GpuUnionExec(children: Seq[SparkPlan]) extends SparkPlan with ShimSparkPlan with GpuExec with Product with Serializable
- case class GpuUnscaledValue(child: Expression) extends GpuUnaryExpression with Product with Serializable
-
class
GpuUnsignedIntegerType extends DataType
An unsigned, 32-bit integer type that maps to DType.UINT32 in cudf.
An unsigned, 32-bit integer type that maps to DType.UINT32 in cudf.
- Note
This type should NOT be used in Catalyst plan nodes that could be exposed to CPU expressions.
-
class
GpuUnsignedLongType extends DataType
An unsigned, 64-bit integer type that maps to DType.UINT64 in cudf.
An unsigned, 64-bit integer type that maps to DType.UINT64 in cudf.
- Note
This type should NOT be used in Catalyst plan nodes that could be exposed to CPU expressions.
-
trait
GpuUserDefinedFunction extends Expression with GpuExpression with ShimExpression with UserDefinedExpression with Serializable
Common implementation across all RAPIDS accelerated UDF types
- trait GpuWindowBaseExec extends SparkPlan with ShimUnaryExecNode with GpuExec
- case class GpuWindowExec(windowOps: Seq[NamedExpression], gpuPartitionSpec: Seq[Expression], gpuOrderSpec: Seq[SortOrder], child: SparkPlan)(cpuPartitionSpec: Seq[Expression], cpuOrderSpec: Seq[SortOrder]) extends SparkPlan with GpuWindowBaseExec with Product with Serializable
-
class
GpuWindowExecMeta extends GpuBaseWindowExecMeta[WindowExec]
Specialization of GpuBaseWindowExecMeta for org.apache.spark.sql.window.WindowExec.
Specialization of GpuBaseWindowExecMeta for org.apache.spark.sql.window.WindowExec. This class implements methods to extract the window-expressions, partition columns, order-by columns, etc. from WindowExec.
- case class GpuWindowExpression(windowFunction: Expression, windowSpec: GpuWindowSpecDefinition) extends Expression with GpuUnevaluable with ShimExpression with Product with Serializable
- abstract class GpuWindowExpressionMetaBase extends ExprMeta[WindowExpression]
- trait GpuWindowFrame extends Expression with GpuExpression with GpuUnevaluable with ShimExpression
- trait GpuWindowFunction extends Expression with GpuUnevaluable with ShimExpression
-
class
GpuWindowIterator extends Iterator[ColumnarBatch] with BasicWindowCalc
An Iterator that performs window operations on the input data.
An Iterator that performs window operations on the input data. It is required that the input data is batched so all of the data for a given key is in the same batch. The input data must also be sorted by both partition by keys and order by keys.
- case class GpuWindowSpecDefinition(partitionSpec: Seq[Expression], orderSpec: Seq[SortOrder], frameSpecification: GpuWindowFrame) extends Expression with GpuExpression with ShimExpression with GpuUnevaluable with Product with Serializable
- class GpuWindowSpecDefinitionMeta extends ExprMeta[WindowSpecDefinition]
-
class
GroupedAggregations extends Arm
Window aggregations that are grouped together.
Window aggregations that are grouped together. It holds the aggregation and the offsets of its input columns, along with the output columns it should write the result to.
- class HMBInputFile extends InputFile
-
class
HMBSeekableInputStream extends SeekableInputStream with HostMemoryInputStreamMixIn
A parquet compatible stream that allows reading from a HostMemoryBuffer to Parquet.
A parquet compatible stream that allows reading from a HostMemoryBuffer to Parquet. The majority of the code here was copied from Parquet's DelegatingSeekableInputStream with minor modifications to have it be make it Scala and call into the HostMemoryInputStreamMixIn's state.
-
final
class
HashedPriorityQueue[T] extends AbstractQueue[T]
Implements a priority queue based on a heap.
Implements a priority queue based on a heap. Like many priority queue implementations, this provides logarithmic time for inserting elements and removing the top element. However unlike many implementations, this provides logarithmic rather than linear time for the random-access
containsandremovemethods. The queue also provides a mechanism for updating the heap after an element's priority has changed via thepriorityUpdatedmethod instead of requiring the element to be removed and re-inserted.The queue is NOT thread-safe.
The iterator does NOT return elements in priority order.
-
case class
Header(meta: Map[String, Array[Byte]], syncBuffer: Array[Byte]) extends Product with Serializable
The header information of an Avro file.
-
trait
HiveProvider extends AnyRef
The subclass of HiveProvider imports spark-hive classes.
The subclass of HiveProvider imports spark-hive classes. This file should not imports spark-hive because
class not foundexception may throw if spark-hive does not exist at runtime. Details see: https://github.com/NVIDIA/spark-rapids/issues/5648 -
class
HostByteBufferIterator extends Iterator[ByteBuffer]
Create an iterator that will emit ByteBuffer instances sequentially to work around the 2GB ByteBuffer size limitation.
Create an iterator that will emit ByteBuffer instances sequentially to work around the 2GB ByteBuffer size limitation. This allows the entire address range of a >2GB host buffer to be covered by a sequence of ByteBuffer instances.
NOTE: It is the caller's responsibility to ensure this iterator does not outlive the host buffer. The iterator DOES NOT increment the reference count of the host buffer to ensure it remains valid.
- returns
ByteBuffer iterator
-
case class
HostColumnarToGpu(child: SparkPlan, goal: CoalesceSizeGoal) extends SparkPlan with ShimUnaryExecNode with GpuExec with Product with Serializable
Put columnar formatted data on the GPU.
-
trait
HostMemoryBuffersWithMetaDataBase extends AnyRef
The base HostMemoryBuffer information read from a single file.
-
class
HostMemoryInputStream extends InputStream with HostMemoryInputStreamMixIn
An implementation of InputStream that reads from a HostMemoryBuffer.
An implementation of InputStream that reads from a HostMemoryBuffer.
NOTE: Closing this input stream does NOT close the buffer!
- trait HostMemoryInputStreamMixIn extends InputStream
-
class
HostMemoryOutputStream extends OutputStream
An implementation of OutputStream that writes to a HostMemoryBuffer.
An implementation of OutputStream that writes to a HostMemoryBuffer.
NOTE: Closing this output stream does NOT close the buffer!
-
class
HostShuffleCoalesceIterator extends Iterator[HostConcatResult] with Arm with AutoCloseable
Iterator that coalesces columnar batches that are expected to only contain SerializedTableColumn.
Iterator that coalesces columnar batches that are expected to only contain SerializedTableColumn. The serialized tables within are collected up to the target batch size and then concatenated on the host before handing them to the caller on
.next() -
class
HostToGpuCoalesceIterator extends AbstractGpuCoalesceIterator
This iterator builds GPU batches from host batches.
This iterator builds GPU batches from host batches. The host batches potentially use Spark's UnsafeRow so it is not safe to cache these batches. Rows must be read and immediately written to CuDF builders.
-
abstract
class
ImperativeAggExprMeta[INPUT <: ImperativeAggregate] extends AggExprMeta[INPUT]
Base class for metadata around
ImperativeAggregate. -
case class
InputCheck(cudf: TypeSig, spark: TypeSig, notes: List[String] = List.empty) extends Product with Serializable
Checks a set of named inputs to an SparkPlan node against a TypeSig
- final class InsertIntoHadoopFsRelationCommandMeta extends DataWritingCommandMeta[InsertIntoHadoopFsRelationCommand]
-
class
InternalExclusiveModeGpuDiscoveryPlugin extends ResourceDiscoveryPlugin with Logging
Note, this class should not be referenced directly in source code.
Note, this class should not be referenced directly in source code. It should be loaded by reflection using ShimLoader.newInstanceOf, see ./docs/dev/shims.md
- Attributes
- protected
-
abstract
class
InternalRowToColumnarBatchIterator extends Iterator[ColumnarBatch]
This class converts InternalRow instances to ColumnarBatches on the GPU through the magic of code generation.
This class converts InternalRow instances to ColumnarBatches on the GPU through the magic of code generation. This just provides most of the framework a concrete implementation will be generated based off of the schema. The InternalRow instances are first converted to UnsafeRow, cheaply if the instance is already UnsafeRow, and then the UnsafeRow data is collected into a ColumnarBatch.
-
trait
JoinGatherer extends LazySpillable with Arm
Generic trait for all join gather instances.
Generic trait for all join gather instances. A JoinGatherer takes the gather maps that are the result of a cudf join call along with the data batches that need to be gathered and allow someone to materialize the join in batches. It also provides APIs to help decide on how many rows to gather.
This is a LazySpillable instance so the life cycle follows that too.
-
class
JoinGathererImpl extends JoinGatherer
JoinGatherer for a single map/table
-
class
JustRowsColumnarBatch extends SpillableColumnarBatch
Cudf does not support a table with columns and no rows.
Cudf does not support a table with columns and no rows. This takes care of making one of those spillable, even though in reality there is no backing buffer. It does this by just keeping the row count in memory, and not dealing with the catalog at all.
-
trait
LazySpillable extends AutoCloseable
Holds something that can be spilled if it is marked as such, but it does not modify the data until it is ready to be spilled.
Holds something that can be spilled if it is marked as such, but it does not modify the data until it is ready to be spilled. This avoids the performance penalty of making reformatting the underlying data so it is ready to be spilled.
Call
allowSpillingto indicate that the data can be released for spilling and callcloseto indicate that the data is not needed any longer.If the data is needed after
allowSpillingis called the implementations should get the data back and cache it again until allowSpilling is called once more. -
trait
LazySpillableColumnarBatch extends LazySpillable
Holds a Columnar batch that is LazySpillable.
-
class
LazySpillableColumnarBatchImpl extends LazySpillableColumnarBatch with Arm
Holds a columnar batch that is cached until it is marked that it can be spilled.
- trait LazySpillableGatherMap extends LazySpillable with Arm
-
class
LazySpillableGatherMapImpl extends LazySpillableGatherMap
Holds a gather map that is also lazy spillable.
- class LeftCrossGatherMap extends BaseCrossJoinGatherMap
- class LiteralExprMeta extends ExprMeta[Literal]
- sealed trait MemoryState extends AnyRef
- class MetricRange extends AutoCloseable
- class MetricsBatchIterator extends Iterator[ColumnarBatch]
- sealed class MetricsLevel extends Serializable
-
class
MultiFileCloudOrcPartitionReader extends MultiFileCloudPartitionReaderBase with MultiFileReaderFunctions with OrcPartitionReaderBase
A PartitionReader that can read multiple ORC files in parallel.
A PartitionReader that can read multiple ORC files in parallel. This is most efficient running in a cloud environment where the I/O of reading is slow.
Efficiently reading a ORC split on the GPU requires re-constructing the ORC file in memory that contains just the Stripes that are needed. This avoids sending unnecessary data to the GPU and saves GPU memory.
-
class
MultiFileCloudParquetPartitionReader extends MultiFileCloudPartitionReaderBase with ParquetPartitionReaderBase
A PartitionReader that can read multiple Parquet files in parallel.
A PartitionReader that can read multiple Parquet files in parallel. This is most efficient running in a cloud environment where the I/O of reading is slow.
Efficiently reading a Parquet split on the GPU requires re-constructing the Parquet file in memory that contains just the column chunks that are needed. This avoids sending unnecessary data to the GPU and saves GPU memory.
-
abstract
class
MultiFileCloudPartitionReaderBase extends FilePartitionReaderBase
The Abstract multi-file cloud reading framework
The Abstract multi-file cloud reading framework
The data driven: next() -> if (first time) initAndStartReaders -> submit tasks (getBatchRunner) -> wait tasks done sequentially -> decode in GPU (readBatch)
-
abstract
class
MultiFileCoalescingPartitionReaderBase extends FilePartitionReaderBase with MultiFileReaderFunctions
The abstracted multi-file coalescing reading class, which tries to coalesce small ColumnarBatch into a bigger ColumnarBatch according to maxReadBatchSizeRows, maxReadBatchSizeBytes and the checkIfNeedToSplitDataBlock.
The abstracted multi-file coalescing reading class, which tries to coalesce small ColumnarBatch into a bigger ColumnarBatch according to maxReadBatchSizeRows, maxReadBatchSizeBytes and the checkIfNeedToSplitDataBlock.
Please be note, this class is applied to below similar file format
| HEADER | -> optional
| block | -> repeated
| FOOTER | -> optional
The data driven:
next() -> populateCurrentBlockChunk (try the best to coalesce ColumnarBatch) -> allocate a bigger HostMemoryBuffer for HEADER + the populated block chunks + FOOTER -> write header to HostMemoryBuffer -> launch tasks to copy the blocks to the HostMemoryBuffer -> wait all tasks finished -> write footer to HostMemoryBuffer -> decode the HostMemoryBuffer in the GPU
- class MultiFileOrcPartitionReader extends MultiFileCoalescingPartitionReaderBase with OrcCommonFunctions
-
class
MultiFileParquetPartitionReader extends MultiFileCoalescingPartitionReaderBase with ParquetPartitionReaderBase
A PartitionReader that can read multiple Parquet files up to the certain size.
A PartitionReader that can read multiple Parquet files up to the certain size. It will coalesce small files together and copy the block data in a separate thread pool to speed up processing the small files before sending down to the GPU.
Efficiently reading a Parquet split on the GPU requires re-constructing the Parquet file in memory that contains just the column chunks that are needed. This avoids sending unnecessary data to the GPU and saves GPU memory.
-
abstract
class
MultiFilePartitionReaderFactoryBase extends PartitionReaderFactory with Arm with Logging
The base multi-file partition reader factory to create the cloud reading or coalescing reading respectively.
- trait MultiFileReaderFunctions extends Arm
-
case class
MultiJoinGather(left: JoinGatherer, right: JoinGatherer) extends JoinGatherer with Product with Serializable
Join Gatherer for a left table and a right table
-
case class
MutableBlockInfo(blockSize: Long, dataSize: Long, count: Long) extends Product with Serializable
The mutable version of the BlockInfo without block start.
The mutable version of the BlockInfo without block start. This is for reusing an existing instance when accessing data in the iterator pattern.
- blockSize
the whole block size (the size between two sync buffers + sync buffer size)
- dataSize
the data size in this block
- count
how many entries in this block
-
final
class
NoRuleDataFromReplacementRule extends DataFromReplacementRule
A version of DataFromReplacementRule that is used when no replacement rule can be found.
-
class
NvcompLZ4CompressionCodec extends TableCompressionCodec with Arm
A table compression codec that uses nvcomp's LZ4-GPU codec
-
class
NvtxWithMetrics extends NvtxRange
NvtxRange with option to pass one or more nano timing metric(s) that are updated upon close by the amount of time spent in the range
- sealed abstract class Optimization extends AnyRef
-
trait
Optimizer extends AnyRef
Optimizer that can operate on a physical query plan.
- class OptionalConfEntry[T] extends ConfEntry[Option[T]]
- trait OrcCodecWritingHelper extends Arm
-
trait
OrcCommonFunctions extends OrcCodecWritingHelper
Collections of some common functions for ORC
-
case class
OrcExtraInfo(requestedMapping: Option[Array[Int]]) extends ExtraInfo with Product with Serializable
Orc extra information containing the requested column ids for the current coalescing stripes
-
case class
OrcOutputStripe(infoBuilder: Builder, footer: StripeFooter, inputDataRanges: DiskRangeList) extends Product with Serializable
This class describes a stripe that will appear in the ORC output memory file.
This class describes a stripe that will appear in the ORC output memory file.
- infoBuilder
builder for output stripe info that has been populated with all fields except those that can only be known when the file is being written (e.g.: file offset, compressed footer length)
- footer
stripe footer
- inputDataRanges
input file ranges (based at file offset 0) of stripe data
-
trait
OrcPartitionReaderBase extends OrcCommonFunctions with Logging with Arm with ScanWithMetrics
A base ORC partition reader which compose of some common methods
-
case class
OrcPartitionReaderContext(filePath: Path, conf: Configuration, fileSchema: TypeDescription, updatedReadSchema: TypeDescription, evolution: SchemaEvolution, fileTail: FileTail, compressionSize: Int, compressionKind: CompressionKind, readerOpts: Options, blockIterator: BufferedIterator[OrcOutputStripe], requestedMapping: Option[Array[Int]]) extends Product with Serializable
This class holds fields needed to read and iterate over the OrcFile
This class holds fields needed to read and iterate over the OrcFile
- filePath
ORC file path
- conf
the Hadoop configuration
- fileSchema
the schema of the whole ORC file
- updatedReadSchema
read schema mapped to the file's field names
- evolution
infer and track the evolution between the schema as stored in the file and the schema that has been requested by the reader.
- fileTail
the ORC FileTail
- compressionSize
the ORC compression size
- compressionKind
the ORC compression type
- readerOpts
options for creating a RecordReader.
- blockIterator
an iterator over the ORC output stripes
- requestedMapping
the optional requested column ids
- case class OrcStripeWithMeta(stripe: OrcOutputStripe, ctx: OrcPartitionReaderContext) extends Product with Serializable
-
case class
OutOfCoreBatch(buffer: SpillableColumnarBatch, firstRow: UnsafeRow) extends AutoCloseable with Product with Serializable
Holds data for the out of core sort.
Holds data for the out of core sort. It includes the batch of data and the first row in that batch so we can sort the batches.
-
case class
ParamCheck(name: String, cudf: TypeSig, spark: TypeSig) extends Product with Serializable
Checks a single parameter by position against a TypeSig
- case class ParquetCachedBatch(numRows: Int, buffer: Array[Byte]) extends CachedBatch with Product with Serializable
-
class
ParquetCachedBatchSerializer extends GpuCachedBatchSerializer with Arm
This class assumes, the data is Columnar and the plugin is on.
This class assumes, the data is Columnar and the plugin is on. Note, this class should not be referenced directly in source code. It should be loaded by reflection using ShimLoader.newInstanceOf, see ./docs/dev/shims.md
- Attributes
- protected
- class ParquetDumper extends HostBufferConsumer with Arm with AutoCloseable
-
case class
ParquetExtraInfo(isCorrectedRebaseMode: Boolean, isCorrectedInt96RebaseMode: Boolean, hasInt96Timestamps: Boolean) extends ExtraInfo with Product with Serializable
Parquet extra information containing isCorrectedRebaseMode
-
class
ParquetPartitionReader extends FilePartitionReaderBase with ParquetPartitionReaderBase
A PartitionReader that reads a Parquet file split on the GPU.
A PartitionReader that reads a Parquet file split on the GPU.
Efficiently reading a Parquet split on the GPU requires re-constructing the Parquet file in memory that contains just the column chunks that are needed. This avoids sending unnecessary data to the GPU and saves GPU memory.
- trait ParquetPartitionReaderBase extends Logging with Arm with ScanWithMetrics with MultiFileReaderFunctions
- case class ParsedBoundary(isUnbounded: Boolean, valueAsLong: Long) extends Product with Serializable
-
abstract
class
PartChecks extends TypeChecks[Map[String, SupportLevel]]
Base class all Partition checks must follow
- case class PartChecksImpl(paramCheck: Seq[ParamCheck] = Seq.empty, repeatingParamCheck: Option[RepeatingParamCheck] = None) extends PartChecks with Product with Serializable
-
abstract
class
PartMeta[INPUT <: Partitioning] extends RapidsMeta[INPUT, Partitioning, GpuPartitioning]
Base class for metadata around
Partitioning. -
class
PartRule[INPUT <: Partitioning] extends ReplacementRule[INPUT, Partitioning, PartMeta[INPUT]]
Holds everything that is needed to replace a
Partitioningwith a GPU enabled version. -
class
PartiallySupported extends SupportLevel
The plugin partially supports this type.
- class PartitionIterator[T] extends Iterator[T]
-
class
PartitionReaderIterator extends Iterator[ColumnarBatch] with AutoCloseable
An adaptor class that provides an Iterator interface for a PartitionReader.
-
class
PartitionReaderWithBytesRead extends PartitionReader[ColumnarBatch]
Wraps a columnar PartitionReader to update bytes read metric based on filesystem statistics.
-
class
Pending extends AutoCloseable
Data that the out of core sort algorithm has not finished sorting.
Data that the out of core sort algorithm has not finished sorting. This acts as a priority queue with each batch sorted by the first row in that batch.
- class PluginException extends RuntimeException
- sealed case class QuantifierFixedLength(length: Int) extends RegexQuantifier with Product with Serializable
- sealed case class QuantifierVariableLength(minLength: Int, maxLength: Option[Int]) extends RegexQuantifier with Product with Serializable
-
abstract
class
QuaternaryExprMeta[INPUT <: QuaternaryExpression] extends ExprMeta[INPUT]
Base class for metadata around
QuaternaryExpression. -
class
RankFixer extends BatchedRunningWindowFixer with Arm with Logging
Rank is more complicated than DenseRank to fix.
Rank is more complicated than DenseRank to fix. This is because there are gaps in the rank values. The rank value of each group is row number of the first row in the group. So values in the same partition group but not the same ordering are fixed by adding the row number from the previous batch to them. If they are a part of the same ordering and part of the same partition, then we need to just put in the previous rank value.
Because we need both a rank and a row number to fix things up the input to this is a struct containing a rank column as the first entry and a row number column as the second entry. This happens in the
scanCombinemethod for GpuRank. It is a little ugly but it works to maintain the requirement that the input to the fixer is a single column. -
trait
RapidsBuffer extends AutoCloseable
Interface provided by all types of RAPIDS buffers
-
class
RapidsBufferCatalog extends Logging
Catalog for lookup of buffers by ID.
Catalog for lookup of buffers by ID. The constructor is only visible for testing, generally
RapidsBufferCatalog.singletonshould be used instead. -
trait
RapidsBufferId extends AnyRef
An identifier for a RAPIDS buffer that can be automatically spilled between buffer stores.
An identifier for a RAPIDS buffer that can be automatically spilled between buffer stores. NOTE: Derived classes MUST implement proper hashCode and equals methods, as these objects are used as keys in hash maps. Scala case classes are recommended.
-
abstract
class
RapidsBufferStore extends AutoCloseable with Logging with Arm
Base class for all buffer store types.
- class RapidsConf extends Logging
-
class
RapidsDeviceMemoryStore extends RapidsBufferStore with Arm
Buffer storage using device memory.
-
class
RapidsDiskStore extends RapidsBufferStore
A buffer store using files on the local disks.
-
class
RapidsDriverPlugin extends DriverPlugin with Logging
The Spark driver plugin provided by the RAPIDS Spark plugin.
-
case class
RapidsExecutorHeartbeatMsg(id: BlockManagerId) extends Product with Serializable
Executor heartbeat message.
Executor heartbeat message. This gives the driver an opportunity to respond with
RapidsExecutorUpdateMsg -
class
RapidsExecutorPlugin extends ExecutorPlugin with Logging
The Spark executor plugin provided by the RAPIDS Spark plugin.
-
case class
RapidsExecutorStartupMsg(id: BlockManagerId) extends Product with Serializable
This is the first message sent from the executor to the driver.
This is the first message sent from the executor to the driver.
- id
BlockManagerIdfor the executor
-
case class
RapidsExecutorUpdateMsg(ids: Array[BlockManagerId]) extends Product with Serializable
Driver response to an startup or heartbeat message, with new (to the peer) executors from the last heartbeat.
-
class
RapidsGdsStore extends RapidsBufferStore with Arm
A buffer store using GPUDirect Storage (GDS).
-
final
class
RapidsHostColumnVector extends RapidsHostColumnVectorCore
A GPU accelerated version of the Spark ColumnVector.
A GPU accelerated version of the Spark ColumnVector. Most of the standard Spark APIs should never be called, as they assume that the data is on the host, and we want to keep as much of the data on the device as possible. We also provide GPU accelerated versions of the transitions to and from rows.
-
class
RapidsHostColumnVectorCore extends ColumnVector
A GPU accelerated version of the Spark ColumnVector.
A GPU accelerated version of the Spark ColumnVector. Most of the standard Spark APIs should never be called, as they assume that the data is on the host, and we want to keep as much of the data on the device as possible. We also provide GPU accelerated versions of the transitions to and from rows.
-
class
RapidsHostMemoryStore extends RapidsBufferStore
A buffer store using host memory.
-
abstract
class
RapidsMeta[INPUT <: BASE, BASE, OUTPUT <: BASE] extends AnyRef
Holds metadata about a stage in the physical plan that is separate from the plan itself.
Holds metadata about a stage in the physical plan that is separate from the plan itself. This is helpful in deciding when to replace part of the plan with a GPU enabled version.
- INPUT
the exact type of the class we are wrapping.
- BASE
the generic base class for this type of stage, i.e. SparkPlan, Expression, etc.
- OUTPUT
when converting to a GPU enabled version of the plan, the generic base type for all GPU enabled versions.
-
final
class
RapidsNullSafeHostColumnVector extends RapidsNullSafeHostColumnVectorCore
Wrapper of a RapidsHostColumnVector, which will check nulls in each "getXXX" call and return the default value of a type when trying to read a null.
Wrapper of a RapidsHostColumnVector, which will check nulls in each "getXXX" call and return the default value of a type when trying to read a null. The performance may not be good enough, so use it only when there is no other way.
-
class
RapidsNullSafeHostColumnVectorCore extends ColumnVector
Wrapper of a RapidsHostColumnVectorCore, which will check nulls in each "getXXX" call and return the default value of a type when trying to read a null.
Wrapper of a RapidsHostColumnVectorCore, which will check nulls in each "getXXX" call and return the default value of a type when trying to read a null. The performance may not be good enough, so use it only when there is no other way.
- class RapidsShuffleHeartbeatEndpoint extends Logging with AutoCloseable
- trait RapidsShuffleHeartbeatHandler extends AnyRef
- class RapidsShuffleHeartbeatManager extends Logging
- sealed trait RegexAST extends AnyRef
- sealed case class RegexBackref(num: Int, isNew: Boolean = false) extends RegexAST with Product with Serializable
- sealed case class RegexChar(ch: Char) extends RegexCharacterClassComponent with Product with Serializable
- sealed case class RegexCharacterClass(negated: Boolean, characters: ListBuffer[RegexCharacterClassComponent]) extends RegexAST with Product with Serializable
- sealed trait RegexCharacterClassComponent extends RegexAST
- sealed case class RegexCharacterRange(start: RegexCharacterClassComponent, end: RegexCharacterClassComponent) extends RegexCharacterClassComponent with Product with Serializable
- sealed case class RegexChoice(a: RegexAST, b: RegexAST) extends RegexAST with Product with Serializable
- sealed case class RegexEmpty() extends RegexAST with Product with Serializable
- sealed case class RegexEscaped(a: Char) extends RegexCharacterClassComponent with Product with Serializable
- sealed case class RegexGroup(capture: Boolean, term: RegexAST) extends RegexAST with Product with Serializable
- sealed case class RegexHexDigit(a: String) extends RegexCharacterClassComponent with Product with Serializable
- sealed trait RegexMode extends AnyRef
- sealed case class RegexOctalChar(a: String) extends RegexCharacterClassComponent with Product with Serializable
-
class
RegexParser extends AnyRef
Regular expression parser based on a Pratt Parser design.
Regular expression parser based on a Pratt Parser design.
The goal of this parser is to build a minimal AST that allows us to validate that we can support the expression on the GPU. The goal is not to parse with the level of detail that would be required if we were building an evaluation engine. For example, operator precedence is largely ignored but could be added if we need it later.
The Java and cuDF regular expression documentation has been used as a reference:
Java regex: https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html cuDF regex: https://docs.rapids.ai/api/libcudf/stable/md_regex.html
The following blog posts provide some background on Pratt Parsers and parsing regex.
- https://journal.stuffwithstuff.com/2011/03/19/pratt-parsers-expression-parsing-made-easy/ - https://matt.might.net/articles/parsing-regex-with-recursive-descent/
- sealed trait RegexQuantifier extends RegexAST
- sealed case class RegexRepetition(a: RegexAST, quantifier: RegexQuantifier) extends RegexAST with Product with Serializable
- sealed case class RegexReplacement(parts: ListBuffer[RegexAST], numCaptureGroups: Int = 0) extends RegexAST with Product with Serializable
- sealed case class RegexSequence(parts: ListBuffer[RegexAST]) extends RegexAST with Product with Serializable
- class RegexUnsupportedException extends SQLException
-
case class
RepeatingParamCheck(name: String, cudf: TypeSig, spark: TypeSig) extends Product with Serializable
Checks the type signature for a parameter that repeats (Can only be used at the end of a list of position parameters)
- case class ReplaceSection[INPUT <: SparkPlan](plan: SparkPlanMeta[INPUT], totalCpuCost: Double, totalGpuCost: Double) extends Optimization with Product with Serializable
-
abstract
class
ReplacementRule[INPUT <: BASE, BASE, WRAP_TYPE <: RapidsMeta[INPUT, BASE, _]] extends DataFromReplacementRule
Base class for all ReplacementRules
Base class for all ReplacementRules
- INPUT
the exact type of the class we are wrapping.
- BASE
the generic base class for this type of stage, i.e. SparkPlan, Expression, etc.
- WRAP_TYPE
base class that should be returned by doWrap.
-
abstract
class
ReplicateRowsExprMeta[INPUT <: ReplicateRows] extends GeneratorExprMeta[INPUT]
Base class for metadata around GeneratorExprMeta.
-
trait
RequireSingleBatchLike extends AnyRef
Trait used for pattern matching for single batch coalesce goals.
-
case class
RequireSingleBatchWithFilter(filterExpression: GpuExpression) extends CoalesceSizeGoal with RequireSingleBatchLike with Product with Serializable
This is exactly the same as
RequireSingleBatchexcept that if the batch would fail to coalesce because it reaches cuDF row-count limits, the coalesce code is free to null filter given the filter expression infilterExpression.This is exactly the same as
RequireSingleBatchexcept that if the batch would fail to coalesce because it reaches cuDF row-count limits, the coalesce code is free to null filter given the filter expression infilterExpression.- Note
This is an ugly hack because ideally these rows are never read from the input source given that we normally push down IsNotNull in Spark. This should be removed when we can handle this in a proper way, likely at the logical plan optimization level. More details here: https://issues.apache.org/jira/browse/SPARK-39131
- class RightCrossGatherMap extends BaseCrossJoinGatherMap
- class RowToColumnarIterator extends Iterator[ColumnarBatch] with Arm
-
final
class
RuleNotFoundDataWritingCommandMeta[INPUT <: DataWritingCommand] extends DataWritingCommandMeta[INPUT]
Metadata for
DataWritingCommandwith no rule found -
final
class
RuleNotFoundExprMeta[INPUT <: Expression] extends ExprMeta[INPUT]
Metadata for
Expressionwith no rule found -
final
class
RuleNotFoundPartMeta[INPUT <: Partitioning] extends PartMeta[INPUT]
Metadata for Partitioning with no rule found
-
final
class
RuleNotFoundScanMeta[INPUT <: Scan] extends ScanMeta[INPUT]
Metadata for
Scanwith no rule found -
final
class
RuleNotFoundSparkPlanMeta[INPUT <: SparkPlan] extends SparkPlanMeta[INPUT]
Metadata for
SparkPlanwith no rule found -
class
SQLExecPlugin extends (SparkSessionExtensions) ⇒ Unit with Logging
Extension point to enable GPU SQL processing.
-
abstract
class
ScanMeta[INPUT <: Scan] extends RapidsMeta[INPUT, Scan, Scan]
Base class for metadata around
Scan. -
class
ScanRule[INPUT <: Scan] extends ReplacementRule[INPUT, Scan, ScanMeta[INPUT]]
Holds everything that is needed to replace a
Scanwith a GPU enabled version. - trait ScanWithMetrics extends AnyRef
- class ScanWithMetricsWrapper extends ScanWithMetrics
-
trait
SchemaBase extends AnyRef
A common trait for different schema in the MultiFileCoalescingPartitionReaderBase.
A common trait for different schema in the MultiFileCoalescingPartitionReaderBase.
The sub-class should wrap the real schema for the specific file format
-
class
SerializedTableColumn extends GpuColumnVectorBase
A special
ColumnVectorthat describes a serialized table read from shuffle.A special
ColumnVectorthat describes a serialized table read from shuffle. This appears in aColumnarBatchto pass serialized tables to GpuShuffleCoalesceExec which should always appear in the query plan immediately after a shuffle. - trait ShimTaggingExpression extends UnaryExpression with TaggingExpression with ShimUnaryExpression
- sealed abstract class ShimVersion extends AnyRef
-
class
ShuffleBufferCatalog extends Arm with Logging
Catalog for lookup of shuffle buffers by block ID
-
case class
ShuffleBufferId(blockId: ShuffleBlockId, tableId: Int) extends RapidsBufferId with Product with Serializable
Identifier for a shuffle buffer that holds the data for a table
-
class
ShuffleReceivedBufferCatalog extends Logging
Catalog for lookup of shuffle buffers by block ID
-
case class
ShuffleReceivedBufferId(tableId: Int) extends RapidsBufferId with Product with Serializable
Identifier for a shuffle buffer that holds the data for a table on the read side
- sealed case class SimpleQuantifier(ch: Char) extends RegexQuantifier with Product with Serializable
-
trait
SingleDataBlockInfo extends AnyRef
A single block info of a file, Eg, A parquet file has 3 RowGroup, then it will produce 3 SingleBlockInfoWithMeta
-
class
SlicedGpuColumnVector extends ColumnVector
Wraps a GpuColumnVector but only points to a slice of it.
Wraps a GpuColumnVector but only points to a slice of it. This is intended to only be used during shuffle after the data is partitioned and before it is serialized.
- sealed trait SortExecType extends Serializable
-
abstract
class
SparkPlanMeta[INPUT <: SparkPlan] extends RapidsMeta[INPUT, SparkPlan, GpuExec]
Base class for metadata around
SparkPlan. -
trait
SparkShimServiceProvider extends AnyRef
A Spark version shim layer interface.
- case class SparkShimVersion(major: Int, minor: Int, patch: Int) extends ShimVersion with Product with Serializable
- trait SparkShims extends AnyRef
- abstract class SpillCallback extends Serializable
-
class
SpillableBuffer extends AutoCloseable with Arm
Just like a SpillableColumnarBatch but for buffers.
-
trait
SpillableColumnarBatch extends AutoCloseable
Holds a ColumnarBatch that the backing buffers on it can be spilled.
-
class
SpillableColumnarBatchImpl extends SpillableColumnarBatch with Arm
The implementation of SpillableColumnarBatch that points to buffers that can be spilled.
The implementation of SpillableColumnarBatch that points to buffers that can be spilled.
- Note
the buffer should be in the cache by the time this is created and this is taking over ownership of the life cycle of the batch. So don't call this constructor directly please use
SpillableColumnarBatch.applyinstead.
-
abstract
class
SplittableJoinIterator extends AbstractGpuJoinIterator with Logging
Base class for join iterators that split and spill batches to avoid GPU OOM errors.
- abstract class String2TrimExpressionMeta[INPUT <: String2TrimExpression] extends ExprMeta[INPUT]
-
class
SumBinaryFixer extends BatchedRunningWindowFixer with Arm with Logging
This class fixes up batched running windows for sum.
This class fixes up batched running windows for sum. Sum is a lot like other binary op fixers, but it has to special case nulls and that is not super generic. In the future we might be able to make this more generic but we need to see what the use case really is.
-
sealed abstract
class
SupportLevel extends AnyRef
The level of support that the plugin has for a given type.
The level of support that the plugin has for a given type. Used for documentation generation.
-
class
Supported extends SupportLevel
Both Spark and the plugin support this.
-
trait
TableCompressionCodec extends AnyRef
An interface to a compression codec that can compress a contiguous Table on the GPU
-
case class
TableCompressionCodecConfig(lz4ChunkSize: Long) extends Product with Serializable
A small case class used to carry codec-specific settings.
-
case class
TargetSize(targetSizeBytes: Long) extends CoalesceSizeGoal with Product with Serializable
Produce a stream of batches that are at most the given size in bytes.
Produce a stream of batches that are at most the given size in bytes. The size is estimated in some cases so it may go over a little, but it should generally be very close to the target size. Generally you should not go over 2 GiB to avoid limitations in cudf for nested type columns.
- targetSizeBytes
the size of each batch in bytes.
- trait TaskAutoCloseableResource extends AutoCloseable
-
abstract
class
TernaryExprMeta[INPUT <: TernaryExpression] extends ExprMeta[INPUT]
Base class for metadata around
TernaryExpression. - abstract class TypeChecks[RET] extends AnyRef
-
final
class
TypeSig extends AnyRef
A type signature.
A type signature. This is a bit limited in what it supports right now, but can express a set of base types and a separate set of types that can be nested under the base types (child types). It can also express if a particular base type has to be a literal or not.
-
trait
TypeSigUtilBase extends AnyRef
Trait of TypeSigUtil for different spark versions
- class TypedConfBuilder[T] extends AnyRef
-
abstract
class
TypedImperativeAggExprMeta[INPUT <: TypedImperativeAggregate[_]] extends ImperativeAggExprMeta[INPUT]
Base class for metadata around
TypedImperativeAggregate. -
abstract
class
UnaryAstExprMeta[INPUT <: UnaryExpression] extends UnaryExprMeta[INPUT]
Base metadata class for unary expressions that support conversion to AST as well
-
abstract
class
UnaryExprMeta[INPUT <: UnaryExpression] extends ExprMeta[INPUT]
Base class for metadata around
UnaryExpression. -
trait
WithTableBuffer extends AnyRef
An interface for obtaining the device buffer backing a contiguous/packed table
- case class WrappedGpuMetric(sqlMetric: SQLMetric) extends GpuMetric with Product with Serializable
Value Members
- object AggregateModeInfo extends Serializable
- object AggregateUtils
- object AlluxioUtils extends Logging
- object ArrayIndexUtils extends Arm
-
object
AstExprContext extends ExpressionContext
This is a special context.
This is a special context. All other contexts are determined by the Spark query in a generic way. AST support in many cases is an optimization and so it is tagged and checked after it is determined that this operation will run on the GPU. In other cases it is required. In those cases AST support is determined and used when tagging the metas to see if they will work on the GPU or not. This part is not done automatically.
- object AutoCloseColumnBatchIterator
- object AvroFileReader extends Arm
- object AvroFileWriter
- object AvroFormatType extends FileFormatType
- object BoolUtils extends Arm
-
object
CaseWhenCheck extends ExprChecks
This is specific to CaseWhen, because it does not follow the typical parameter convention.
- object CoalesceGoal
-
object
ColumnCastUtil extends Arm
This class casts a column to another column if the predicate passed resolves to true.
This class casts a column to another column if the predicate passed resolves to true. This method should be able to handle nested or non-nested types
At this time this is strictly a place for casting methods
- object ColumnarOutputWriter
- object ColumnarPartitionReaderWithPartitionValues extends Arm
-
object
ColumnarRdd
This provides a way to get back out GPU Columnar data RDD[Table].
This provides a way to get back out GPU Columnar data RDD[Table]. Each Table will have the same schema as the dataframe passed in. If the schema of the dataframe is something that Rapids does not currently support an
IllegalArgumentExceptionwill be thrown.The size of each table will be determined by what is producing that table but typically will be about the number of bytes set by RapidsConf.GPU_BATCH_SIZE_BYTES.
Table is not a typical thing in an RDD so special care needs to be taken when working with it. By default it is not serializable so repartitioning the RDD or any other operator that involves a shuffle will not work. This is because it is very expensive to serialize and deserialize a GPU Table using a conventional spark shuffle. Also most of the memory associated with the Table is on the GPU itself, so each table must be closed when it is no longer needed to avoid running out of GPU memory. By convention it is the responsibility of the one consuming the data to close it when they no longer need it.
-
object
ConcatAndConsumeAll
Consumes an Iterator of ColumnarBatches and concatenates them into a single ColumnarBatch.
Consumes an Iterator of ColumnarBatches and concatenates them into a single ColumnarBatch. The batches will be closed when this operation is done.
- object ConfHelper
- object CreateMapCheck extends ExprChecks
-
object
CreateNamedStructCheck extends ExprChecks
A check for CreateNamedStruct.
A check for CreateNamedStruct. The parameter values alternate between one type and another. If this pattern shows up again we can make this more generic at that point.
- object CsvFormatType extends FileFormatType
- object CudfRowTransitions
- object CudfTDigest
- object CudfUnaryExpression
- object DataTypeMeta
- object DataTypeUtils
-
object
DateUtils
Class for helper functions for Date
- object DecimalUtil extends Arm
- object DenseRankFixer extends Arm
- object DumpUtils extends Logging with Arm
-
object
ExecChecks
gives users an API to create ExecChecks.
- object ExecutionPlanCaptureCallback
- object Explain
- object ExplainPlan
- object ExprChecks
- object ExpressionContext
- object FileFormatChecks
- object FileUtils
- object FloatUtils extends Arm
- object FullSortSingleBatch extends SortExecType
- object GatherUtils extends Arm
- object GeneratedInternalRowToCudfRowIterator extends Logging
- object GpuBaseAggregateMeta
-
object
GpuBatchUtils
Utility class with methods for calculating various metrics about GPU memory usage prior to allocation.
- object GpuBindReferences extends Logging
- object GpuBuildLeft extends GpuBuildSide with Product with Serializable
- object GpuBuildRight extends GpuBuildSide with Product with Serializable
- object GpuCSVScan extends Serializable
-
object
GpuCanonicalize
Rewrites an expression using rules that are guaranteed preserve the result while attempting to remove cosmetic variations.
Rewrites an expression using rules that are guaranteed preserve the result while attempting to remove cosmetic variations. Deterministic expressions that are
equalafter canonicalization will always return the same answer given the same input (i.e. false positives should not be possible). However, it is possible that two canonical expressions that are not equal will in fact return the same answer given any input (i.e. false negatives are possible).The following rules are applied:
- Names and nullability hints for
org.apache.spark.sql.types.DataTypesare stripped. - Names for
GetStructFieldare stripped. - TimeZoneId for
CastandAnsiCastare stripped ifneedsTimeZoneis false. - Commutative and associative operations (
AddandMultiply) have their children ordered byhashCode. EqualToandEqualNullSafeare reordered by hashCode.- Other comparisons (
GreaterThan,LessThan) are reversed byhashCode. - Elements in
Inare reordered byhashCode.
This is essentially a copy of the Spark
Canonicalizeclass but updated for GPU operators - Names and nullability hints for
- object GpuCast extends Arm with Serializable
- object GpuCoalesceExec extends Serializable
- object GpuColumnarToRowExec extends Serializable
- object GpuDataWritingCommand
- object GpuDeviceManager extends Logging
- object GpuExec extends Serializable
- object GpuExpressionWithSideEffectUtils extends Arm
- object GpuExpressionsUtils extends Arm
-
object
GpuFilter extends Arm
Run a filter on a batch.
Run a filter on a batch. The batch will be consumed.
- object GpuJoinUtils
- object GpuKeyBatchingIterator
-
object
GpuListUtils extends Arm
Provide a set of APIs to manipulate array/list columns in common ways.
- object GpuLiteral extends Serializable
-
object
GpuMapUtils extends Arm
Provide a set of APIs to manipulate map columns in common ways.
Provide a set of APIs to manipulate map columns in common ways. CUDF does not officially support maps so we store it as a list of key/value structs.
- object GpuMetric extends Logging with Serializable
- object GpuNvl extends Arm
- object GpuOrcScan extends Arm with Serializable
- object GpuOverrideUtil extends Logging
- object GpuOverrides extends Logging with Serializable
- object GpuParquetFileFormat
-
object
GpuParquetPartitionReaderFactoryBase
Base object that has common functions for both GpuParquetPartitionReaderFactory and GpuParquetPartitionReaderFactory
- object GpuParquetScan extends Serializable
- object GpuParquetUtils extends Logging
- object GpuProjectExec extends Arm with Serializable
- object GpuRangePartitioner extends Serializable
- object GpuReadCSVFileFormat
- object GpuReadOrcFileFormat extends Serializable
- object GpuReadParquetFileFormat extends Serializable
-
object
GpuRowNumber extends Expression with GpuRunningWindowFunction with GpuBatchedRunningWindowWithFixer with Product with Serializable
The row number in the window.
The row number in the window.
- Note
this is a running window only operator
- object GpuRunningWindowIterator extends Arm
- object GpuScalar extends Arm with Logging
- object GpuSemaphore
- object GpuShuffledHashJoinExec extends Arm with Serializable
- object GpuSinglePartitioning extends Expression with GpuExpression with ShimExpression with GpuPartitioning with Product with Serializable
- object GpuTextBasedDateUtils
- object GpuTopN extends Arm with Serializable
- object GpuTransitionOverrides
- object GpuTypedImperativeSupportedAggregateExecMeta
- object GpuUnsignedIntegerType extends GpuUnsignedIntegerType with Product with Serializable
- object GpuUnsignedLongType extends GpuUnsignedLongType with Product with Serializable
- object GpuUnspecifiedFrame extends Expression with GpuWindowFrame with Product with Serializable
- object GpuUserDefinedFunction extends Serializable
- object GpuWindowExec extends Arm with Serializable
- object GroupByAggExprContext extends ExpressionContext
- object GroupedAggregations extends Arm
- object Header extends Serializable
- object HostColumnarToGpu extends Logging with Serializable
- object IcebergFormatType extends FileFormatType
-
object
InputFileBlockRule
InputFileBlockRule is to prevent the SparkPlans [SparkPlan (with first input_file_xxx expression), FileScan) to run on GPU
InputFileBlockRule is to prevent the SparkPlans [SparkPlan (with first input_file_xxx expression), FileScan) to run on GPU
See https://github.com/NVIDIA/spark-rapids/issues/3333
- object JoinGatherer extends Arm
- object JoinGathererImpl
- object JsonFormatType extends FileFormatType
- object LazySpillableColumnarBatch
- object LazySpillableGatherMap
- object MemoryCostHelper
- object MetaUtils extends Arm
- object MetricsLevel extends Serializable
- object MultiFileReaderThreadPool extends Logging
- object NoopMetric extends GpuMetric
-
object
NotApplicable extends SupportLevel
N/A neither spark nor the plugin supports this.
-
object
NotSupported extends SupportLevel
Spark supports this but the plugin does not.
- object NvtxWithMetrics
- object OrcFormatType extends FileFormatType
- object OutOfCoreSort extends SortExecType
- object ParquetDumper extends Arm
- object ParquetFormatType extends FileFormatType
- object ParquetPartitionReader
- object ParquetSchemaUtils extends Arm
- object PartChecks
- object PartitionReaderIterator
- object PartitionedFileUtils
- object PlanUtils
- object ProjectExprContext extends ExpressionContext
- object RankFixer extends Arm
- object RapidsBuffer
- object RapidsBufferCatalog extends Logging with Arm
- object RapidsBufferStore
- object RapidsConf
- object RapidsExecutorPlugin
- object RapidsMeta
-
object
RapidsPluginImplicits
RapidsPluginImplicits, adds implicit functions for ColumnarBatch, Seq, Seq[AutoCloseable], and Array[AutoCloseable] that help make resource management easier within the project.
- object RapidsPluginUtils extends Logging
- object RapidsReaderType extends Enumeration
- object ReadFileOp extends FileFormatOp
- object ReductionAggExprContext extends ExpressionContext
- object RegexFindMode extends RegexMode
- object RegexParser
- object RegexReplaceMode extends RegexMode
- object RegexSplitMode extends RegexMode
-
object
RequireSingleBatch extends CoalesceSizeGoal with RequireSingleBatchLike with Product with Serializable
A single batch is required as the input to a node in the SparkPlan.
A single batch is required as the input to a node in the SparkPlan. This means all of the data for a given task is in a single batch. This should be avoided as much as possible because it can result in running out of memory or run into limitations of the batch size by both Spark and cudf.
-
object
RowCountPlanVisitor
Estimate the number of rows that an operator will output.
Estimate the number of rows that an operator will output. Note that these row counts are the aggregate across all output partitions.
Logic is based on Spark's SizeInBytesOnlyStatsPlanVisitor. which operates on logical plans and only computes data sizes, not row counts.
- object SamplingUtils extends Arm
- object SchemaUtils extends Arm
- object SerializedTableColumn
- object ShimLoader extends Logging
- object ShuffleBufferCatalog
- object ShuffleMetadata extends Logging
- object ShuffleReceivedBufferCatalog
- object SortEachBatch extends SortExecType
- object SortUtils extends Arm
-
object
SpillPriorities
Utility methods for managing spillable buffer priorities.
Utility methods for managing spillable buffer priorities. The spill priority numerical space is divided into potentially overlapping ranges based on the type of buffer.
- object SpillableBuffer extends Arm
- object SpillableColumnarBatch extends Arm
-
object
StorageTier extends Enumeration
Enumeration of the storage tiers
-
object
SupportedOpsDocs
Used for generating the support docs.
- object SupportedOpsForTools
- object TableCompressionCodec
- object TypeChecks
-
object
TypeEnum extends Enumeration
The Supported Types.
The Supported Types. The TypeSig API should be preferred for this, except in a few cases when TypeSig asks for a TypeEnum.
- object TypeSig
- object VersionUtils
- object WindowAggExprContext extends ExpressionContext
-
object
WindowSpecCheck extends ExprChecks
This is specific to WindowSpec, because it does not follow the typical parameter convention.
- object WriteFileOp extends FileFormatOp