Packages

o

quasar.physical.mongodb

MongoDbPlanner

object MongoDbPlanner

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

Type Members

  1. type ExecTimeR[F[_]] = MonadReader_[F, Instant]
  2. type OutputM[A] = \/[PlannerError, A]
  3. type Partial[T[_[_]], In, Out] = (slamdata.Predef.PartialFunction[slamdata.Predef.List[In], Out], slamdata.Predef.List[InputFinder[T]])
  4. type PartialSelector[T[_[_]]] = (slamdata.Predef.PartialFunction[slamdata.Predef.List[BsonField], Selector], slamdata.Predef.List[InputFinder[T]])
  5. trait Planner[F[_]] extends AnyRef

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def HasInt[M[_], WF[_]](wb: WorkflowBuilder[WF])(implicit arg0: Monad[M], arg1: MonadFsErr[M], ev0: :<:[WorkflowOpCoreF, WF]): M[slamdata.Predef.Long]
    Annotations
    @SuppressWarnings()
  5. def HasLiteral[M[_], WF[_]](wb: WorkflowBuilder[WF])(implicit arg0: Applicative[M], arg1: MonadFsErr[M], ev0: :<:[WorkflowOpCoreF, WF]): M[Bson]
    Annotations
    @SuppressWarnings()
  6. val accumulator: (ReduceFunc[Fix[ExprOp]]) ⇒ AccumOp[Fix[ExprOp]]
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def buildWorkflow[T[_[_]], M[_], WF[_], EX[_]](cfg: PlannerConfig[T, EX, WF])(qs: T[[β$95$]Coproduct[[β$5$]QScriptCore[T, β$5$], [A]Coproduct[[β$3$]EquiJoin[T, β$3$], [β$4$]Const[ShiftedRead[Path[Abs, File, Sandboxed]], β$4$], A], β$95$]])(implicit arg0: BirecursiveT[T], arg1: EqualT[T], arg2: RenderTreeT[T], arg3: ShowT[T], arg4: Monad[M], arg5: PhaseResultTell[M], arg6: MonadFsErr[M], arg7: ExecTimeR[M], arg8: Functor[WF], arg9: Coalesce[WF], arg10: Crush[WF], arg11: Traverse[EX], ev0: :<:[WorkflowOpCoreF, WF], ev1: :<:[EX, ExprOp], ev2: RenderTree[Fix[WF]]): M[Fix[WF]]
  9. val check: Check[Fix[ExprOp], ExprOp]
  10. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  11. def createFieldName(prefix: slamdata.Predef.String, i: slamdata.Predef.Int): slamdata.Predef.String
  12. def defaultSelector[T[_[_]]]: PartialSelector[T]
  13. def ejsonToExpression[M[_], EJ](v: BsonVersion)(ej: EJ)(implicit arg0: Applicative[M], arg1: MonadFsErr[M], EJ: Aux[EJ, EJson]): M[Fix[ExprOp]]
  14. def ejsonToJs[M[_], EJ](ej: EJ)(implicit arg0: Applicative[M], arg1: MonadFsErr[M], arg2: Show[EJ], EJ: Aux[EJ, EJson]): M[JsCore]
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. def exprOrJs[M[_], A](a: A)(exf: (A) ⇒ M[Fix[ExprOp]], jsf: (A) ⇒ M[JsFn])(implicit arg0: Applicative[M], arg1: MonadFsErr[M]): M[Expr]
  18. def expression[T[_[_]], M[_], EX[_]](funcHandler: ~>[[β$14$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$14$], [β$15$]Option[Free[EX, β$15$]]])(implicit arg0: RecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: ExecTimeR[M], arg4: MonadFsErr[M], arg5: Traverse[EX], inj: :<:[EX, ExprOp]): AlgebraM[M, [β$16$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$16$], Fix[ExprOp]]
  19. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def findFirst[T[_[_]], F[_], A](f: slamdata.Predef.PartialFunction[T[F], A])(implicit arg0: RecursiveT[T], arg1: Functor[F], arg2: Foldable[F]): CoalgebraM[[β$89$]\/[A, β$89$], F, T[F]]
  21. def generateTypeCheck[In, Out](or: (Out, Out) ⇒ Out)(f: slamdata.Predef.PartialFunction[Type, (In) ⇒ Out]): (Type) ⇒ slamdata.Predef.Option[(In) ⇒ Out]
    Annotations
    @SuppressWarnings()
  22. def getBuilder[T[_[_]], M[_], WF[_], EX[_], A](handler: (FreeMapA[T, A]) ⇒ M[Expr], v: BsonVersion)(src: WorkflowBuilder[WF], fm: FreeMapA[T, A])(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: MonadFsErr[M], arg4: Ops[WF], arg5: Traverse[EX], ev: :<:[EX, ExprOp]): M[WorkflowBuilder[WF]]
  23. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  24. def getExpr[T[_[_]], M[_], EX[_]](funcHandler: ~>[[β$47$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$47$], [β$48$]Option[Free[EX, β$48$]]], staticHandler: StaticHandler[T, EX])(fm: FreeMap[T])(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: ExecTimeR[M], arg4: MonadFsErr[M], arg5: Traverse[EX], arg6: Inject[EX, [A]Coproduct[ExprOp3_4_4F, [A]Coproduct[ExprOp3_4F, [A]ExprOpCoreF[A], A], A]]): M[Fix[ExprOp]]
  25. def getExprBuilder[T[_[_]], M[_], WF[_], EX[_]](funcHandler: ~>[[β$74$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$74$], [β$75$]Option[Free[EX, β$75$]]], staticHandler: StaticHandler[T, EX], v: BsonVersion)(src: WorkflowBuilder[WF], fm: FreeMap[T])(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: ExecTimeR[M], arg4: MonadFsErr[M], arg5: Traverse[EX], ev: :<:[EX, ExprOp], WF: Ops[WF]): M[WorkflowBuilder[WF]]
  26. def getExprMerge[T[_[_]], M[_], EX[_]](funcHandler: ~>[[β$78$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$78$], [β$79$]Option[Free[EX, β$79$]]], staticHandler: StaticHandler[T, EX])(jf: JoinFunc[T], a1: DocVar, a2: DocVar)(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: MonadFsErr[M], arg4: ExecTimeR[M], arg5: Traverse[EX], inj: :<:[EX, ExprOp]): M[Fix[ExprOp]]
  27. def getExprRed[T[_[_]], M[_], EX[_]](funcHandler: ~>[[β$84$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$84$], [β$85$]Option[Free[EX, β$85$]]], staticHandler: StaticHandler[T, EX])(jr: FreeMapA[T, ReduceIndex])(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: ExecTimeR[M], arg4: MonadFsErr[M], arg5: Traverse[EX], ev: :<:[EX, ExprOp]): M[Fix[ExprOp]]
  28. def getFilterBuilder[T[_[_]], M[_], WF[_], EX[_], A](handler: (FreeMapA[T, A]) ⇒ M[Expr], v: BsonVersion)(src: WorkflowBuilder[WF], fm: FreeMapA[T, A])(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: MonadFsErr[M], arg4: Traverse[EX], ev: :<:[EX, ExprOp], WB: Ops[WF]): M[(WorkflowBuilder[WF], FreeMapA[T, A])]
  29. def getJsFn[T[_[_]], M[_]](fm: FreeMap[T])(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: MonadFsErr[M], arg4: ExecTimeR[M]): M[JsFn]
  30. def getJsMerge[T[_[_]], M[_]](jf: JoinFunc[T], a1: JsCore, a2: JsCore)(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: MonadFsErr[M], arg4: ExecTimeR[M]): M[JsFn]
  31. def getJsRed[T[_[_]], M[_]](jr: Free[[β$86$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$86$], ReduceIndex])(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: MonadFsErr[M], arg4: ExecTimeR[M]): M[JsFn]
  32. def getReduceBuilder[T[_[_]], M[_], WF[_], EX[_]](funcHandler: ~>[[β$76$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$76$], [β$77$]Option[Free[EX, β$77$]]], staticHandler: StaticHandler[T, EX], v: BsonVersion)(src: WorkflowBuilder[WF], fm: FreeMapA[T, ReduceIndex])(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: ExecTimeR[M], arg4: MonadFsErr[M], arg5: Traverse[EX], ev: :<:[EX, ExprOp], WF: Ops[WF]): M[WorkflowBuilder[WF]]
  33. def getSelector[T[_[_]], M[_], EX[_], A](fm: FreeMapA[T, A], default: OutputM[PartialSelector[T]], galg: GAlgebra[[β$5$](T[[β$4$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$4$]], β$5$), [β$6$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$6$], OutputM[PartialSelector[T]]])(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: MonadFsErr[M], arg4: Traverse[EX], inj: :<:[EX, ExprOp]): OutputM[PartialSelector[T]]
  34. def getStructBuilder[T[_[_]], M[_], WF[_], EX[_]](handler: (FreeMap[T]) ⇒ M[Expr], v: BsonVersion)(src: WorkflowBuilder[WF], struct: FreeMap[T], rootKey: Name, structKey: Name)(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: MonadFsErr[M], arg4: Ops[WF], arg5: Traverse[EX], ev: :<:[EX, ExprOp]): M[WorkflowBuilder[WF]]
  35. def handleFreeMap[T[_[_]], M[_], EX[_]](funcHandler: ~>[[β$80$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$80$], [β$81$]Option[Free[EX, β$81$]]], staticHandler: StaticHandler[T, EX], fm: FreeMap[T])(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: ExecTimeR[M], arg4: MonadFsErr[M], arg5: Traverse[EX], ev: :<:[EX, ExprOp]): M[Expr]
  36. def handleRedRepair[T[_[_]], M[_], EX[_]](funcHandler: ~>[[β$82$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$82$], [β$83$]Option[Free[EX, β$83$]]], staticHandler: StaticHandler[T, EX], jr: FreeMapA[T, ReduceIndex])(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: ExecTimeR[M], arg4: MonadFsErr[M], arg5: Traverse[EX], ev: :<:[EX, ExprOp]): M[Expr]
  37. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  38. def invoke2Nel[T[_[_]]](x: OutputM[PartialSelector[T]], y: OutputM[PartialSelector[T]])(f: (Selector, Selector) ⇒ Selector): OutputM[PartialSelector[T]]
  39. def invoke2Rel[T[_[_]]](x: OutputM[PartialSelector[T]], y: OutputM[PartialSelector[T]])(f: (Selector, Selector) ⇒ Selector): OutputM[PartialSelector[T]]
  40. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  41. def javascript[T[_[_]], M[_]](implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Applicative[M], arg3: MonadFsErr[M], arg4: ExecTimeR[M]): AlgebraM[M, [β$17$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$17$], JsCore]
  42. def liftM[M[_], A](meh: WBM[A])(implicit arg0: Monad[M], arg1: MonadFsErr[M]): M[A]

    Brings a WBM into our M.

  43. def log[M[_], A](label: slamdata.Predef.String, ma: M[A])(implicit arg0: Monad[M], arg1: RenderTree[A], mtell: MonadTell_[M, PhaseResults]): M[A]
  44. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  45. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  46. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  47. def plan[T[_[_]], M[_]](qs: T[[β$107$]Coproduct[[β$5$]QScriptCore[T, β$5$], [A]Coproduct[[β$3$]EquiJoin[T, β$3$], [β$4$]Const[ShiftedRead[Path[Abs, File, Sandboxed]], β$4$], A], β$107$]], queryContext: QueryContext, queryModel: MongoQueryModel, anyDoc: (Collection) ⇒ OptionT[M, BsonDocument])(implicit arg0: BirecursiveT[T], arg1: EqualT[T], arg2: ShowT[T], arg3: RenderTreeT[T], arg4: Monad[M], arg5: PhaseResultTell[M], arg6: MonadFsErr[M], arg7: ExecTimeR[M]): M[Crystallized[WorkflowF]]

    Translate the QScript plan to an executable MongoDB "physical" plan, taking into account the current runtime environment as captured by the given context.

    Translate the QScript plan to an executable MongoDB "physical" plan, taking into account the current runtime environment as captured by the given context.

    Internally, the type of the plan being built constrains which operators can be used, but the resulting plan uses the largest, common type so that callers don't need to worry about it.

    anyDoc

    returns any document in the given Collection

  48. def plan0[T[_[_]], M[_], WF[_], EX[_]](anyDoc: (Collection) ⇒ OptionT[M, BsonDocument], cfg: PlannerConfig[T, EX, WF])(qs: T[[β$99$]Coproduct[[β$5$]QScriptCore[T, β$5$], [A]Coproduct[[β$3$]EquiJoin[T, β$3$], [β$4$]Const[ShiftedRead[Path[Abs, File, Sandboxed]], β$4$], A], β$99$]])(implicit arg0: BirecursiveT[T], arg1: EqualT[T], arg2: RenderTreeT[T], arg3: ShowT[T], arg4: Monad[M], arg5: PhaseResultTell[M], arg6: MonadFsErr[M], arg7: ExecTimeR[M], arg8: Traverse[WF], arg9: Coalesce[WF], arg10: Crush[WF], arg11: Crystallize[WF], arg12: Traverse[EX], ev0: :<:[WorkflowOpCoreF, WF], ev1: Ops[WF], ev2: :<:[EX, ExprOp], ev3: RenderTree[Fix[WF]]): M[Crystallized[WF]]
  49. def planExecTime[T[_[_]], M[_]](qs: T[[β$103$]Coproduct[[β$5$]QScriptCore[T, β$5$], [A]Coproduct[[β$3$]EquiJoin[T, β$3$], [β$4$]Const[ShiftedRead[Path[Abs, File, Sandboxed]], β$4$], A], β$103$]], queryContext: QueryContext, queryModel: MongoQueryModel, anyDoc: (Collection) ⇒ OptionT[M, BsonDocument], execTime: Instant)(implicit arg0: BirecursiveT[T], arg1: EqualT[T], arg2: ShowT[T], arg3: RenderTreeT[T], arg4: Monad[M], arg5: PhaseResultTell[M], arg6: MonadFsErr[M]): M[Crystallized[WorkflowF]]
  50. def processMapFunc[T[_[_]], M[_], A](fm: FreeMapA[T, A])(recovery: (A) ⇒ JsCore)(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: MonadFsErr[M], arg4: ExecTimeR[M]): M[JsCore]
  51. def processMapFuncExpr[T[_[_]], M[_], EX[_], A](funcHandler: ~>[[β$0$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$0$], [β$1$]Option[Free[EX, β$1$]]], staticHandler: StaticHandler[T, EX])(fm: FreeMapA[T, A])(recovery: (A) ⇒ Fix[ExprOp])(implicit arg0: BirecursiveT[T], arg1: ShowT[T], arg2: Monad[M], arg3: ExecTimeR[M], arg4: MonadFsErr[M], arg5: Traverse[EX], inj: :<:[EX, ExprOp]): M[Fix[ExprOp]]
  52. def rebaseWB[T[_[_]], M[_], WF[_], EX[_]](cfg: PlannerConfig[T, EX, WF], free: FreeQS[T], src: WorkflowBuilder[WF])(implicit arg0: EqualT[T], arg1: Monad[M], arg2: ExecTimeR[M], arg3: MonadFsErr[M], arg4: Functor[WF], arg5: Coalesce[WF], arg6: Crush[WF], arg7: Traverse[EX], F: Aux[T, [β$87$]Coproduct[[β$0$]QScriptCore[T, β$0$], [β$1$]Coproduct[[β$2$]ProjectBucket[T, β$2$], [β$3$]Coproduct[[β$4$]ThetaJoin[T, β$4$], [β$5$]Coproduct[[β$6$]EquiJoin[T, β$6$], [β$7$]Coproduct[[β$8$]Const[ShiftedRead[Path[Abs, Dir, Sandboxed]], β$8$], [β$9$]Coproduct[[β$10$]Const[ShiftedRead[Path[Abs, File, Sandboxed]], β$10$], [β$11$]Coproduct[[β$12$]Const[Read[Path[Abs, Dir, Sandboxed]], β$12$], [β$13$]Coproduct[[β$14$]Const[Read[Path[Abs, File, Sandboxed]], β$14$], [β$15$]Const[DeadEnd, β$15$], β$13$], β$11$], β$9$], β$7$], β$5$], β$3$], β$1$], β$87$]], ev0: :<:[WorkflowOpCoreF, WF], ev1: RenderTree[WorkflowBuilder[WF]], ev2: Ops[WF], ev3: :<:[EX, ExprOp]): M[WorkflowBuilder[WF]]
  53. def selector[T[_[_]]](v: BsonVersion)(implicit arg0: RecursiveT[T], arg1: ShowT[T]): GAlgebra[[β$23$](T[[β$22$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$22$]], β$23$), [β$24$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$24$], OutputM[PartialSelector[T]]]

    The selector phase tries to turn expressions into MongoDB selectors – i.e.

    The selector phase tries to turn expressions into MongoDB selectors – i.e. Mongo query expressions. Selectors are only used for the filtering pipeline op, so it's quite possible we build more stuff than is needed (but it doesn’t matter, unneeded annotations will be ignored by the pipeline phase).

    Like the expression op phase, this one requires bson field annotations.

    Most expressions cannot be turned into selector expressions without using the "$where" operator, which allows embedding JavaScript code. Unfortunately, using this operator turns filtering into a full table scan. We should do a pass over the tree to identify partial boolean expressions which can be turned into selectors, factoring out the leftovers for conversion using $where.

  54. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  55. def toMongoQScript[T[_[_]], M[_]](anyDoc: (Collection) ⇒ OptionT[M, BsonDocument], qs: T[[β$90$]Coproduct[[β$5$]QScriptCore[T, β$5$], [A]Coproduct[[β$3$]EquiJoin[T, β$3$], [β$4$]Const[ShiftedRead[Path[Abs, File, Sandboxed]], β$4$], A], β$90$]])(implicit arg0: BirecursiveT[T], arg1: EqualT[T], arg2: RenderTreeT[T], arg3: ShowT[T], arg4: Monad[M], arg5: MonadFsErr[M], arg6: PhaseResultTell[M], BR: Branches[T, [β$91$]Coproduct[[β$5$]QScriptCore[T, β$5$], [A]Coproduct[[β$3$]EquiJoin[T, β$3$], [β$4$]Const[ShiftedRead[Path[Abs, File, Sandboxed]], β$4$], A], β$91$]]): M[T[[β$92$]Coproduct[[β$5$]QScriptCore[T, β$5$], [A]Coproduct[[β$3$]EquiJoin[T, β$3$], [β$4$]Const[ShiftedRead[Path[Abs, File, Sandboxed]], β$4$], A], β$92$]]]
  56. def toString(): String
    Definition Classes
    AnyRef → Any
  57. def typeSelector[T[_[_]]](implicit arg0: RecursiveT[T], arg1: ShowT[T]): GAlgebra[[β$20$](T[[β$19$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$19$]], β$20$), [β$21$]Coproduct[[β$62$]MapFuncCore[T, β$62$], [β$63$]MapFuncDerived[T, β$63$], β$21$], OutputM[PartialSelector[T]]]
  58. def unimplemented[M[_], A](label: slamdata.Predef.String)(implicit arg0: MonadFsErr[M]): M[A]
  59. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  62. object Planner

Inherited from AnyRef

Inherited from Any

Ungrouped