package sql
- Alphabetic
- Public
- Protected
Type Members
- case class Alias(query: Query, name: String) extends Query with Product with Serializable
A Name alias.
- case class AnonymousInput(inputType: TabularData, slot: Int = 0) extends Query with Product with Serializable
Anonymous input (e.g.
Anonymous input (e.g. plain select on given TabularType)
- inputType
type of input
- slot
the anonymous slot (for multiple inputs)
- case class ArrayGetExpression(array: Expression, index: Expression) extends BinaryExpression with Product with Serializable
Returns array value.
- sealed trait BinaryExpression extends Expression
An expression built from two expressions
- case class BinaryOperationExpression(op: BinaryOperation, left: Expression, right: Expression) extends BinaryExpression with Product with Serializable
A Simple binary expression which works on the same type.
- case class CastExpression(expression: Expression, dataType: DataType) extends UnaryExpression with Product with Serializable
An expression is casted.
- case class ColumnExpression(columnId: Int, dataType: DataType) extends LeafExpression with Product with Serializable
A Column is selected.
- sealed trait Condition extends Expression
A Condition is a special expression which emits a boolean value.
- case class ConstantExpression(value: SingleElementBundle) extends LeafExpression with Product with Serializable
A Constant Expression.
- sealed trait Expression extends AnyRef
An expression (e.g.
An expression (e.g. Inside Select).
- case class Join(left: Query, right: Query, joinType: JoinType, condition: JoinCondition) extends Query with Product with Serializable
A Join Query
A Join Query
- left
left query
- right
right query
- joinType
kind of join
- condition
condition Join Condition
- sealed trait JoinCondition extends AnyRef
Join Conditions.
- sealed abstract class JoinType extends AnyRef
Different Jon Types.
- sealed trait LeafExpression extends Expression
An expression which is not build from other expressions
- sealed trait MultiQuery extends AnyRef
Combines multiples queries (returning multiple tabular data streams)
- sealed trait Query extends AnyRef
Base trait for a Query.
- case class QueryColumn(name: String, alias: Option[String], dataType: DataType) extends Product with Serializable
A Single column inside a query.
- case class QueryTabularType(columns: Vector[QueryColumn]) extends Product with Serializable
Resulting type of a query.
Resulting type of a query. Similar to ai.mantik.ds.TabularData but with support for alias and duplicates
- case class Select(input: Query, projections: Option[Vector[SelectProjection]] = None, selection: Vector[Condition] = Vector.empty) extends Query with Product with Serializable
A Select selects elements from a stream of tabular rows.
A Select selects elements from a stream of tabular rows. (Like in SQL Selects), transforms and filters them
Mantik only supports a subset of SQL Selects yet, however it's a design goal that improvements should be solved similar to SQL if applicable.
- projections
the columns which are returned, if None all are returned.
- selection
AND-concatenated filters
- case class SelectProjection(columnName: String, expression: Expression) extends Product with Serializable
A Single Column in a select statement.
- case class SingleQuery(query: Query) extends MultiQuery with Product with Serializable
A Single Query as MultiQuery.
- case class SizeExpression(expression: Expression) extends UnaryExpression with Product with Serializable
Returns array length.
- case class Split(query: Query, fractions: Vector[Double], shuffleSeed: Option[Long] = None) extends MultiQuery with Product with Serializable
A Split operation.
A Split operation.
- query
input data
- fractions
the splitting fractions [0.0 .. 1.0], remaining data will form the last table. resulting data will consist of N + 1 tables.
- shuffleSeed
if given, shuffle data with the given seed
- case class SqlContext(anonymous: Vector[TabularData] = Vector.empty) extends Product with Serializable
Context for translating SQL Expressions
Context for translating SQL Expressions
- anonymous
anonymous sources
- case class StructAccessExpression(expression: Expression, name: String) extends UnaryExpression with Product with Serializable
Gives access to a structural field
- sealed trait UnaryExpression extends Expression
An expression built from one expression.
- case class Union(left: Query, right: Query, all: Boolean) extends Query with Product with Serializable
An UNION.
Value Members
- object AutoSelect
Helpers for creating automatic Select-Operations for converting DataTypes.
- object AutoUnion
Helpers for creating automatic union operations with data type compatibility
- object Condition
- object ConstantExpression extends Serializable
- object Join extends Serializable
- object JoinCondition
- object JoinType
- object MultiQuery
- object Query
- object QueryColumn extends Serializable
- object QueryTabularType extends Serializable
- object Select extends Serializable
- object SqlFormatter
Formats Queries as SQL again.