Package

quasar

qscript

Permalink

package qscript

Here we no longer care about provenance. Backends can’t do anything with it, so we simply represent joins and crosses directly. This also means that we don’t need to model certain things – project_d is just a data-level function, nest_d & swap_d only modify provenance and so are irrelevant here, and autojoin_d has been replaced with a lower-level join operation that doesn’t include the cross portion.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. qscript
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed abstract class Binary[T[_[_]], A] extends MapFunc[T, A]

    Permalink
  2. final case class BucketField[T[_[_]], A](src: A, value: FreeMap[T], name: FreeMap[T]) extends QScriptBucket[T, A] with Product with Serializable

    Permalink
  3. final case class BucketIndex[T[_[_]], A](src: A, value: FreeMap[T], index: FreeMap[T]) extends QScriptBucket[T, A] with Product with Serializable

    Permalink
  4. trait Bucketable[F[_]] extends Serializable

    Permalink
  5. sealed abstract class DeadEnd extends AnyRef

    Permalink
  6. final case class Drop[T[_[_]], A](src: A, from: FreeQS[T], count: FreeQS[T]) extends QScriptCore[T, A] with Product with Serializable

    Permalink
  7. trait ElideBuckets[F[_]] extends Serializable

    Permalink
  8. trait ElideBucketsInstances extends ElideBucketsInstances0

    Permalink
  9. trait ElideBucketsInstances0 extends AnyRef

    Permalink
  10. final case class EquiJoin[T[_[_]], A](src: A, lBranch: FreeQS[T], rBranch: FreeQS[T], lKey: FreeMap[T], rKey: FreeMap[T], f: JoinType, combine: JoinFunc[T]) extends Product with Serializable

    Permalink

    This is an optional component of QScript that can be used instead of ThetaJoin.

    This is an optional component of QScript that can be used instead of ThetaJoin. It’s easier to implement, but more restricted (where ThetaJoin has an arbitrary predicate to determin if a pair of records should be combined, EquiJoin has an expression on each side that is compared with simple equality).

  11. type EquiQScript[T[_[_]], A] = Coproduct[[β]EquiJoin[T, β], [β]Coproduct[Read, [β]Coproduct[[β]QScriptCore[T, β], [β]Coproduct[[β]Const[DeadEnd, β], [β]SourcedPathable[T, β], β], β], β], A]

    Permalink

    A variant with a simpler join type.

    A variant with a simpler join type. A backend can choose to operate on this structure by applying the equiJoinsOnly transformation. Backends without true join support will likely find it easier to work with this than to handle full ThetaJoins.

  12. final case class Filter[T[_[_]], A](src: A, f: FreeMap[T]) extends QScriptCore[T, A] with Product with Serializable

    Permalink

    Eliminates some values from a dataset, based on the result of FilterFunc.

  13. type FreeMap[T[_[_]]] = Free[[β]MapFunc[T, β], Unit]

    Permalink
  14. type FreeQS[T[_[_]]] = Free[[β]Coproduct[[β]QScriptBucket[T, β], [β]Coproduct[[β]ThetaJoin[T, β], [β]Coproduct[[β]QScriptCore[T, β], [β]Coproduct[[β]Const[DeadEnd, β], [β]SourcedPathable[T, β], β], β], β], β], Unit]

    Permalink
  15. type FreeUnit[F[_]] = Free[F, Unit]

    Permalink
  16. final case class GroupBy[T[_[_]], A](src: A, values: FreeMap[T], bucket: FreeMap[T]) extends QScriptBucket[T, A] with Product with Serializable

    Permalink
  17. trait Helpers[T[_[_]]] extends AnyRef

    Permalink
  18. type JoinFunc[T[_[_]]] = Free[[β]MapFunc[T, β], JoinSide]

    Permalink
  19. sealed trait JoinSide extends AnyRef

    Permalink
  20. sealed abstract class JoinType extends AnyRef

    Permalink
  21. final case class LeftShift[T[_[_]], A](src: A, struct: FreeMap[T], repair: JoinFunc[T]) extends SourcedPathable[T, A] with Product with Serializable

    Permalink

    Flattens nested structure, converting each value into a data set, which are then unioned.

    Flattens nested structure, converting each value into a data set, which are then unioned.

    struct is an expression that evaluates to an array or object, which is then “exploded” into multiple values. repair is applied across the new set, integrating the exploded values into the original set.

  22. final case class LeftShiftBucket[T[_[_]], A](src: A, struct: FreeMap[T], repair: JoinFunc[T], bucketShift: FreeMap[T]) extends QScriptBucket[T, A] with Product with Serializable

    Permalink
  23. final case class Map[T[_[_]], A](src: A, f: FreeMap[T]) extends SourcedPathable[T, A] with Product with Serializable

    Permalink

    A data-level transformation.

  24. sealed abstract class MapFunc[T[_[_]], A] extends AnyRef

    Permalink
  25. trait Mergeable[A] extends Serializable

    Permalink
  26. trait Normalizable[F[_]] extends Serializable

    Permalink
  27. trait NormalizableInstances extends NormalizableInstances0

    Permalink
  28. trait NormalizableInstances0 extends AnyRef

    Permalink
  29. final case class Nullary[T[_[_]], A](ejson: T[EJson]) extends MapFunc[T, A] with Product with Serializable

    Permalink
  30. class Optimize[T[_[_]]] extends Helpers[T]

    Permalink
  31. type Pathable[T[_[_]], A] = Coproduct[[β]Const[DeadEnd, β], [β]SourcedPathable[T, β], A]

    Permalink
  32. type QScript[T[_[_]], A] = Coproduct[[β]ThetaJoin[T, β], [β]Coproduct[Read, [β]Coproduct[[β]QScriptCore[T, β], [β]Coproduct[[β]Const[DeadEnd, β], [β]SourcedPathable[T, β], β], β], β], A]

    Permalink

    This is the primary form seen by a backend.

    This is the primary form seen by a backend. It contains reads of files.

  33. sealed abstract class QScriptBucket[T[_[_]], A] extends AnyRef

    Permalink
  34. type QScriptCommon[T[_[_]], A] = Coproduct[Read, [β]Coproduct[[β]QScriptCore[T, β], [β]Coproduct[[β]Const[DeadEnd, β], [β]SourcedPathable[T, β], β], β], A]

    Permalink

    These nodes exist in all QScript structures that a backend sees.

  35. sealed abstract class QScriptCore[T[_[_]], A] extends AnyRef

    Permalink
  36. type QScriptInternal[T[_[_]], A] = Coproduct[[β]QScriptBucket[T, β], [β]Coproduct[[β]ThetaJoin[T, β], [β]Coproduct[[β]QScriptCore[T, β], [β]Coproduct[[β]Const[DeadEnd, β], [β]SourcedPathable[T, β], β], β], β], A]

    Permalink
  37. type QScriptPrim[T[_[_]], A] = Coproduct[[β]QScriptCore[T, β], [β]Coproduct[[β]Const[DeadEnd, β], [β]SourcedPathable[T, β], β], A]

    Permalink

    These are the operations included in all forms of QScript.

  38. type QScriptPure[T[_[_]], A] = Coproduct[[β]ThetaJoin[T, β], [β]Coproduct[[β]QScriptCore[T, β], [β]Coproduct[[β]Const[DeadEnd, β], [β]SourcedPathable[T, β], β], β], A]

    Permalink

    This is the target of the core compiler.

    This is the target of the core compiler. Normalization is applied to this structure, and it contains no Read or EquiJoin.

  39. final case class Read[A](src: A, path: AbsFile[Sandboxed]) extends Product with Serializable

    Permalink

    A backend-resolved Root, which is now a path.

  40. final case class Reduce[T[_[_]], A, N <: Nat](src: A, bucket: FreeMap[T], reducers: Sized[List[ReduceFunc[FreeMap[T]]], Succ[N]], repair: Free[[β]MapFunc[T, β], Fin[Succ[N]]]) extends QScriptCore[T, A] with Product with Serializable

    Permalink

    Performs a reduction over a dataset, with the dataset partitioned by the result of the MapFunc.

    Performs a reduction over a dataset, with the dataset partitioned by the result of the MapFunc. So, rather than many-to-one, this is many-to-fewer.

    bucket partitions the values into buckets based on the result of the expression, reducers applies the provided reduction to each expression, and repair finally turns those reduced expressions into a final value.

  41. sealed trait ReduceFunc[A] extends AnyRef

    Permalink
  42. final case class Sort[T[_[_]], A](src: A, bucket: FreeMap[T], order: List[(FreeMap[T], SortDir)]) extends QScriptCore[T, A] with Product with Serializable

    Permalink

    Sorts values within a bucket.

    Sorts values within a bucket. This could be represented with LeftShift(Map(_.sort, Reduce(_ :: _, ???)) but backends tend to provide sort directly, so this avoids backends having to recognize the pattern. We could provide an algebra (Sort :+: QScript)#λ => QScript so that a backend without a native sort could eliminate this node.

  43. sealed trait SortDir extends AnyRef

    Permalink
  44. sealed abstract class SourcedPathable[T[_[_]], A] extends AnyRef

    Permalink
  45. final case class SquashBucket[T[_[_]], A](src: A) extends QScriptBucket[T, A] with Product with Serializable

    Permalink
  46. final case class SrcMerge[A, B](src: A, left: B, right: B) extends Product with Serializable

    Permalink
  47. final case class Take[T[_[_]], A](src: A, from: FreeQS[T], count: FreeQS[T]) extends QScriptCore[T, A] with Product with Serializable

    Permalink
  48. sealed abstract class Ternary[T[_[_]], A] extends MapFunc[T, A]

    Permalink
  49. final case class ThetaJoin[T[_[_]], A](src: A, lBranch: FreeQS[T], rBranch: FreeQS[T], on: JoinFunc[T], f: JoinType, combine: JoinFunc[T]) extends Product with Serializable

    Permalink

    Applies a function across two datasets, in the cases where the JoinFunc evaluates to true.

    Applies a function across two datasets, in the cases where the JoinFunc evaluates to true. The branches represent the divergent operations applied to some common src. Each branch references the src exactly once. (Since no constructor has more than one recursive component, it’s guaranteed that neither side references the src _more_ than once.)

    This case represents a full θJoin, but we could have an algebra that rewites it as Filter(_, EquiJoin(...)) to simplify behavior for the backend.

  50. class Transform[T[_[_]], F[_]] extends Helpers[T]

    Permalink
  51. sealed abstract class Unary[T[_[_]], A] extends MapFunc[T, A]

    Permalink
  52. final case class Union[T[_[_]], A](src: A, lBranch: FreeQS[T], rBranch: FreeQS[T]) extends SourcedPathable[T, A] with Product with Serializable

    Permalink

    Creates a new dataset, |a|+|b|, containing all of the entries from each of the input sets, without any indication of which set they came from

    Creates a new dataset, |a|+|b|, containing all of the entries from each of the input sets, without any indication of which set they came from

    This could be handled as another join type, the anti-join (T[EJson] \/ T[EJson] => T[EJson], specifically as _.merge), with the condition being κ(true),

Value Members

  1. object BucketField extends Serializable

    Permalink
  2. object BucketIndex extends Serializable

    Permalink
  3. object Bucketable extends Serializable

    Permalink
  4. val CommonEJson: :<:[Common, EJson]

    Permalink
  5. object DeadEnd

    Permalink
  6. object Drop extends Serializable

    Permalink
  7. object ElideBuckets extends ElideBucketsInstances with Serializable

    Permalink
  8. object Empty extends DeadEnd with Product with Serializable

    Permalink
  9. object EquiJoin extends Serializable

    Permalink
  10. val ExtEJson: :<:[Extension, EJson]

    Permalink
  11. object Filter extends Serializable

    Permalink
  12. object FullOuter extends JoinType with Product with Serializable

    Permalink
  13. object GroupBy extends Serializable

    Permalink
  14. object Inner extends JoinType with Product with Serializable

    Permalink
  15. object JoinSide

    Permalink
  16. object JoinType

    Permalink
  17. object LeftOuter extends JoinType with Product with Serializable

    Permalink
  18. object LeftShift extends Serializable

    Permalink
  19. object LeftShiftBucket extends Serializable

    Permalink
  20. object LeftSide extends JoinSide with Product with Serializable

    Permalink
  21. object Map extends Serializable

    Permalink
  22. object MapFunc

    Permalink
  23. object MapFuncs

    Permalink
  24. object Mergeable extends Serializable

    Permalink
  25. object Normalizable extends NormalizableInstances with Serializable

    Permalink
  26. object QScriptBucket

    Permalink
  27. object QScriptCore

    Permalink
  28. object Read extends Serializable

    Permalink
  29. object Reduce extends Serializable

    Permalink
  30. object ReduceFunc

    Permalink
  31. object ReduceFuncs

    Permalink
  32. object RightOuter extends JoinType with Product with Serializable

    Permalink
  33. object RightSide extends JoinSide with Product with Serializable

    Permalink
  34. object Root extends DeadEnd with Product with Serializable

    Permalink

    The top level of a filesystem.

    The top level of a filesystem. During compilation this represents /, but in the structure a backend sees, it represents the mount point.

  35. object Sort extends Serializable

    Permalink
  36. object SortDir

    Permalink
  37. object SourcedPathable

    Permalink
  38. object SquashBucket extends Serializable

    Permalink
  39. object Take extends Serializable

    Permalink
  40. object ThetaJoin extends Serializable

    Permalink
  41. object Union extends Serializable

    Permalink
  42. def UnitF[T[_[_]]]: Free[[β]MapFunc[T, β], Unit]

    Permalink
  43. def rebase[M[_], A](in: M[A], field: M[A])(implicit arg0: Bind[M]): M[A]

    Permalink

Inherited from AnyRef

Inherited from Any

MRA

Ungrouped