Base class for metadata around AggregateFunction
.
Base class for metadata around Expression
.
Base metadata class for binary expressions that support conversion to AST
Base class for metadata around BinaryExpression
.
Meta-data for cast and ansi_cast.
Base class for metadata around ComplexTypeMergingExpression
.
Checks an expression that have input parameters and a single output.
Transpile Java/Spark regular expression to a format that cuDF supports, or throw an exception if this is not possible.
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.
Base class for metadata around DataWritingCommand
.
Holds everything that is needed to replace a DataWritingCommand
with a
GPU enabled version.
Metadata for SparkPlan
that should not be replaced or have any kind of warning for
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.
Holds everything that is needed to replace a SparkPlan
with a GPU enabled version.
Base class all Expression checks must follow.
Holds everything that is needed to replace an Expression with a GPU enabled version.
Checks for either a read or a write of a given file format.
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.
The Exec class that implements window functions (E.g. o.a.s.sql.execution.window.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.
Base class for metadata around ImperativeAggregate
.
Checks a set of named inputs to an SparkPlan node against a TypeSig
A version of DataFromReplacementRule that is used when no replacement rule can be found.
Checks a single parameter by position against a TypeSig
Base class all Partition checks must follow
Base class for metadata around Partitioning
.
Holds everything that is needed to replace a Partitioning
with a GPU enabled version.
The plugin partially supports this type.
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.
the exact type of the class we are wrapping.
the generic base class for this type of stage, i.e. SparkPlan, Expression, etc.
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/
Checks the type signature for a parameter that repeats (Can only be used at the end of a list of position parameters)
Base class for all ReplacementRules
Base class for all ReplacementRules
the exact type of the class we are wrapping.
the generic base class for this type of stage, i.e. SparkPlan, Expression, etc.
base class that should be returned by doWrap.
Base class for metadata around GeneratorExprMeta.
Metadata for DataWritingCommand
with no rule found
Metadata for Expression
with no rule found
Metadata for Partitioning with no rule found
Metadata for SparkPlan
with no rule found
Base class for metadata around SparkPlan
.
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.
Both Spark and the plugin support this.
Base class for metadata around TernaryExpression
.
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 of TypeSigUtil for different spark versions
Base class for metadata around TypedImperativeAggregate
.
Base metadata class for unary expressions that support conversion to AST as well
Base class for metadata around UnaryExpression
.
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.
This is specific to CaseWhen, because it does not follow the typical parameter convention.
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.
Class for helper functions for Date
gives users an API to create ExecChecks.
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
N/A neither spark nor the plugin supports this.
Spark supports this but the plugin does not.
Used for generating the support docs.
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.
This is specific to WidowSpec, because it does not follow the typical parameter convention.
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.