Package

mimir

algebra

Permalink

package algebra

Visibility
  1. Public
  2. All

Type Members

  1. case class AdaptiveView(schema: String, name: String, query: Operator, annotations: Set[T] = Set()) extends Operator with Product with Serializable

    Permalink

    A view defined by an adaptive schema

    A view defined by an adaptive schema

    When initialized by RAToSql, the query field will contain the raw unmodified query that the view was instantiated with. As the view goes through compilation, the nested query will be modified; The metadata field tracks which forms of compilation have been applied to it, so that the system can decide whether it has an appropriate materialized form of the view ready.

    Annotations
    @SerialVersionUID()
  2. case class AggFunction(function: String, distinct: Boolean, args: Seq[Expression], alias: String) extends Serializable with Product

    Permalink
    Annotations
    @SerialVersionUID()
  3. case class Aggregate(groupby: Seq[Var], aggregates: Seq[AggFunction], source: Operator) extends Operator with Product with Serializable

    Permalink
    Annotations
    @SerialVersionUID()
  4. case class Annotate(source: Operator, invisSch: Seq[(String, AnnotateArg)]) extends Operator with Product with Serializable

    Permalink

    invisify provenance attributes operator -- With Provenance

  5. case class AnnotateArg(annotationType: T, name: String, typ: Type, expr: Expression) extends Product with Serializable

    Permalink
  6. case class Arithmetic(op: Op, lhs: Expression, rhs: Expression) extends Expression with Product with Serializable

    Permalink

    Non-relational binary operations.

    Non-relational binary operations. This includes integer and boolean arithmetic.

    See the Arith enum above for a full list of available operations.

    Annotations
    @SerialVersionUID()
  7. case class BoolPrimitive(v: Boolean) extends PrimitiveValue with Product with Serializable

    Permalink

    Boxed representation of a boolean

    Boxed representation of a boolean

    Annotations
    @SerialVersionUID()
  8. case class Comparison(op: Op, lhs: Expression, rhs: Expression) extends Expression with Product with Serializable

    Permalink

    Relational binary operations.

    Relational binary operations. This includes equality/inequality, ordering operators, and simple string comparators (e.g., SQL's LIKE)

    Annotations
    @SerialVersionUID()
  9. case class Conditional(condition: Expression, thenClause: Expression, elseClause: Expression) extends Expression with Product with Serializable

    Permalink

    Representation of an If-Then-Else block.

    Representation of an If-Then-Else block. Note that this differs from SQL's use of CASE blocks. If-Then-Else is substantially easier to work with for recursive analyses.

    For conversion between If-Then-Else and CASE semantics, see the methods

    • makeCaseExpression
    • foldConditionalsToCase in mimir.algebra.ExpressionUtils.
    Annotations
    @SerialVersionUID()
  10. case class DatePrimitive(y: Int, m: Int, d: Int) extends PrimitiveValue with Comparable[DatePrimitive] with Product with Serializable

    Permalink

    Boxed representation of a date

    Boxed representation of a date

    Annotations
    @SerialVersionUID()
  11. class Eval extends AnyRef

    Permalink
  12. class EvalTypeException extends Exception

    Permalink
  13. sealed abstract class Expression extends ExpressionConstructors

    Permalink

    Base type for expression trees.

    Base type for expression trees. Represents a single node in the tree.

  14. trait ExpressionConstructors extends AnyRef

    Permalink
  15. case class FloatPrimitive(v: Double) extends NumericPrimitive with Product with Serializable

    Permalink

    Boxed representation of a double-precision floating point number

    Boxed representation of a double-precision floating point number

    Annotations
    @SerialVersionUID()
  16. case class Function(op: String, params: Seq[Expression]) extends Expression with Product with Serializable

    Permalink

    Invocation of a System- or User-Defined Function.

    Invocation of a System- or User-Defined Function.

    For Mimir to be completely happy, functions need to be defined with mimir.algebra.FunctionRegistry and have an entry in mimir.algebra.Eval.

    TODO: Move inline function definition from Eval to FunctionRegistry

    Annotations
    @SerialVersionUID()
  17. case class HardTable(schema: Seq[(String, Type)], data: Seq[Seq[PrimitiveValue]]) extends Operator with Product with Serializable

    Permalink

    A table with exactly one row --- Corresponds roughly to a SELECT ...

    A table with exactly one row --- Corresponds roughly to a SELECT ... That is, a SELECT with no FROM clause, or in Oracle: SELECT ... FROM dual

    Not really used, just a placeholder for intermediate optimization.

    Annotations
    @SerialVersionUID()
  18. case class IntPrimitive(v: Long) extends NumericPrimitive with Product with Serializable

    Permalink

    Boxed representation of a long integer

    Boxed representation of a long integer

    Annotations
    @SerialVersionUID()
  19. case class IntervalPrimitive(p: Period) extends PrimitiveValue with Product with Serializable

    Permalink

    Boxed Representation of Interval

    Boxed Representation of Interval

    Annotations
    @SerialVersionUID()
  20. case class IsNullExpression(child: Expression) extends Expression with Product with Serializable

    Permalink

    Representation of a unary IS NULL

    Representation of a unary IS NULL

    Annotations
    @SerialVersionUID()
  21. case class JDBCVar(t: Type) extends LeafExpression with Product with Serializable

    Permalink

    Representation of a JDBC Variable.

    Representation of a JDBC Variable.

    Annotations
    @SerialVersionUID()
  22. case class Join(left: Operator, right: Operator) extends Operator with Product with Serializable

    Permalink

    Relational algebra cartesian product (I know, technically not an actual join)

    Relational algebra cartesian product (I know, technically not an actual join)

    Annotations
    @SerialVersionUID()
  23. sealed abstract class LeafExpression extends Expression

    Permalink

    Slightly more specific base type for nodes without children Like Expression, but handles children/rebuild for free

    Slightly more specific base type for nodes without children Like Expression, but handles children/rebuild for free

    Annotations
    @SerialVersionUID()
  24. case class LeftOuterJoin(left: Operator, right: Operator, condition: Expression) extends Operator with Product with Serializable

    Permalink

    A left outer join

    A left outer join

    Annotations
    @SerialVersionUID()
  25. case class Limit(offset: Long, count: Option[Long], source: Operator) extends Operator with Product with Serializable

    Permalink

    Indicates that the source operator's output should be truncated after the specified number of rows.

    Indicates that the source operator's output should be truncated after the specified number of rows.

    Annotations
    @SerialVersionUID()
  26. class MissingVariable extends TypecheckError

    Permalink
  27. case class Not(child: Expression) extends Expression with Product with Serializable

    Permalink

    Boolean Negation

    Boolean Negation

    Annotations
    @SerialVersionUID()
  28. case class NullPrimitive() extends PrimitiveValue with Product with Serializable

    Permalink

    Boxed representation of NULL

    Boxed representation of NULL

    Annotations
    @SerialVersionUID()
  29. class NullTypeException extends TypeException

    Permalink
  30. sealed abstract class NumericPrimitive extends PrimitiveValue

    Permalink
  31. sealed abstract class Operator extends Serializable with OperatorConstructors

    Permalink

    Abstract parent class of all relational algebra operators

  32. trait OperatorConstructors extends AnyRef

    Permalink
  33. sealed abstract class PrimitiveValue extends LeafExpression with Serializable

    Permalink

    Slightly more specific base type for constant terms.

    Slightly more specific base type for constant terms. PrimitiveValue also acts as a boxing type for constants in Mimir.

  34. abstract class Proc extends Expression

    Permalink

    A placeholder for use in extending Eval; A proc is an expression that can be evaluated, but is not itself part of mimir's grammar.

    A placeholder for use in extending Eval; A proc is an expression that can be evaluated, but is not itself part of mimir's grammar.

    The proc defines the method of evaluation.

  35. case class Project(columns: Seq[ProjectArg], source: Operator) extends Operator with Product with Serializable

    Permalink

    Generalized relational algebra projection

    Generalized relational algebra projection

    Annotations
    @SerialVersionUID()
  36. case class ProjectArg(name: String, expression: Expression) extends Serializable with Product

    Permalink

    A single column output by a projection

  37. case class ProvenanceOf(source: Operator) extends Operator with Product with Serializable

    Permalink

    provenance of operator -- Provenance Of

  38. class RAException extends Exception

    Permalink
  39. case class Recover(source: Operator, invisSch: Seq[(String, AnnotateArg)]) extends Operator with Product with Serializable

    Permalink

    visify provenance attributes operator -- Provenance Of

  40. case class RowIdPrimitive(v: String) extends PrimitiveValue with Product with Serializable

    Permalink

    Boxed representation of a row identifier/provenance token

    Boxed representation of a row identifier/provenance token

    Annotations
    @SerialVersionUID()
  41. case class RowIdVar() extends LeafExpression with Product with Serializable

    Permalink

    Representation of a Provenance Token / Row Identifier.

    Representation of a Provenance Token / Row Identifier. RowId has a special place in the expression syntax, because unlike classical SQL implicit ROWID attributes, Mimir's ROWID attributes don't need to reference a specific table. If a ROWID appears in an operator that reads from multiple tables, Mimir will synthesize a new, unique ROWID from the ROWIDs of its constituents.

    see mimir.provenance.Provenance for more details.

    Annotations
    @SerialVersionUID()
  42. case class Select(condition: Expression, source: Operator) extends Operator with Product with Serializable

    Permalink

    Relational algebra selection

    Relational algebra selection

    Annotations
    @SerialVersionUID()
  43. case class Sort(sorts: Seq[SortColumn], source: Operator) extends Operator with Product with Serializable

    Permalink

    Indicates that the source operator's output should be sorted in the specified order

    Indicates that the source operator's output should be sorted in the specified order

    Annotations
    @SerialVersionUID()
  44. case class SortColumn(expression: Expression, ascending: Boolean) extends Product with Serializable

    Permalink

    A single sort directive

    A single sort directive

    Consists of a column name, as well as a binary "ascending" or "descending"

    (e.g., as in SELECT * FROM FOO ORDER BY bar ASC)

    Annotations
    @SerialVersionUID()
  45. case class StringPrimitive(v: String) extends PrimitiveValue with Product with Serializable

    Permalink

    Boxed representation of a string

    Boxed representation of a string

    Annotations
    @SerialVersionUID()
  46. case class TAny() extends Type with Product with Serializable

    Permalink
  47. case class TBool() extends Type with Product with Serializable

    Permalink
  48. case class TDate() extends Type with Product with Serializable

    Permalink
  49. case class TFloat() extends Type with Product with Serializable

    Permalink
  50. case class TInt() extends Type with Product with Serializable

    Permalink
  51. case class TInterval() extends Type with Product with Serializable

    Permalink
  52. case class TRowId() extends Type with Product with Serializable

    Permalink
  53. case class TString() extends Type with Product with Serializable

    Permalink
  54. case class TTimestamp() extends Type with Product with Serializable

    Permalink
  55. case class TType() extends Type with Product with Serializable

    Permalink
  56. case class TUser(name: String) extends Type with Product with Serializable

    Permalink
  57. case class Table(name: String, alias: String, sch: Seq[(String, Type)], metadata: Seq[(String, Expression, Type)]) extends Operator with Product with Serializable

    Permalink

    A base relation (Table).

    A base relation (Table).

    Note that schema information is required to make Typechecking self-contained and database-independent

    Metadata columns are special implicit attributes used by many database backends. They are specified as follows: (output, input, type) Where: output: The name that the implicit attribute will be referenced by in the output relation input: An expression to extract the implicit attribute type: The type of the implicit attribute. For example: ("MIMIR_ROWID", Var("ROWID"), Type.TRowId()) will extract SQL's implicit ROWID attribute into the new column "MIMIR_ROWID" with the rowid type.

    Annotations
    @SerialVersionUID()
  58. case class TimestampPrimitive(y: Int, m: Int, d: Int, hh: Int, mm: Int, ss: Int, ms: Int) extends PrimitiveValue with Comparable[TimestampPrimitive] with Product with Serializable

    Permalink

    Boxed Representation of Timestamp

    Boxed Representation of Timestamp

    Annotations
    @SerialVersionUID()
  59. sealed trait Type extends AnyRef

    Permalink

    An enum class defining the type of primitive-valued expressions (e.g., integers, floats, strings, etc...)

  60. case class TypeException(found: Type, expected: Type, detail: String, context: Option[Expression] = None) extends Exception with Product with Serializable

    Permalink
  61. case class TypePrimitive(t: Type) extends PrimitiveValue with Product with Serializable

    Permalink

    Boxed representation of a type object

    Boxed representation of a type object

    Annotations
    @SerialVersionUID()
  62. class TypecheckError extends Exception

    Permalink
  63. class Typechecker extends LazyLogging

    Permalink

    ExpressionChecker wraps around a bit of context that makes recursion through Expression objects easier.

    ExpressionChecker wraps around a bit of context that makes recursion through Expression objects easier. Concretely

    scope: ... is a lookup function for the types of variables, which the Typechecker has no way to figure out on its own. The easiest way to pull this off is to simply pass a Map[String,TAny] object, as its apply() method will do the trick, but it's handy to leave this open to any lookup function. The scope doesn't need to be present for the typechecker to work, but if it isn't then it'll fail if it hits any Var object.

    context : ... is an operator for debugging purposes. If any typechecker error occurs, then we'll annotate the error with this operator.

  64. case class Union(left: Operator, right: Operator) extends Operator with Product with Serializable

    Permalink

    Relational algebra bag union

    Relational algebra bag union

    Annotations
    @SerialVersionUID()
  65. case class VGTerm(name: String, idx: Int, args: Seq[Expression], hints: Seq[Expression]) extends Expression with Product with Serializable

    Permalink
  66. case class Var(name: String) extends LeafExpression with Product with Serializable

    Permalink

    Representation of a column reference (a SQL variable).

    Representation of a column reference (a SQL variable). Names are all that's needed. Typechecker expects Operators to be self-contained, but not Expressions.

    Annotations
    @SerialVersionUID()
  67. case class View(name: String, query: Operator, annotations: Set[T] = Set()) extends Operator with Product with Serializable

    Permalink

    A (maybe materialized) view

    A (maybe materialized) view

    When initialized by RAToSql, the query field will contain the raw unmodified query that the view was instantiated with. As the view goes through compilation, the nested query will be modified; The metadata field tracks which forms of compilation have been applied to it, so that the system can decide whether it has an appropriate materialized form of the view ready.

    Annotations
    @SerialVersionUID()

Value Members

  1. object Arith extends Enumeration

    Permalink

    Utility class supporting binary arithmetic operations

    Utility class supporting binary arithmetic operations

    Arith.Op is an Enumeration type for binary arithmetic operations

  2. object Cast

    Permalink
  3. object Cmp extends Enumeration

    Permalink

    Enumerator for comparison types

  4. object Eval

    Permalink
  5. object ExpressionUtils

    Permalink

    Utility methods for manipulating expressions

  6. object OperatorUtils extends LazyLogging

    Permalink
  7. object QueryNamer

    Permalink
  8. object Type

    Permalink
  9. object TypeRegistry

    Permalink
  10. object Typechecker extends LazyLogging

    Permalink
  11. package function

    Permalink
  12. package gprom

    Permalink

Ungrouped