Missing implemention errors
I am trying to use frameless in Databricks. Thanks to advice on gitter, I made some code modifications as described in dsabanin/frameless@1ce8f0b, based on frameless 0.8.0. However, running some tests related to my application, I am getting "an implementation is missing" errors.
The error is raised when reaching the following code in dataset/src/main/scala/frameless/functions/Lit.scala:
protected def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = ???
The functional code triggering the error:
val opt: Option[String] = Some("bar")
val tds = TypedDataset.createUnsafe(...)
val filtered = opt.map(v => tds.filter(tds('foo) === v)).getOrElse(tds) // here
not sure if this is correct, but this seems to fix the problem:
protected def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = {
ctx.references += this
val resultEval = encoder.toCatalyst(new Literal(obj, encoder.jvmRepr)).genCode(ctx)
ev.copy(
code = resultEval.code,
value = resultEval.value,
isNull = resultEval.isNull
)
}
would be fixed by #700
@pomadchin - this should also be closeable now due to #699
Oh yes, this is closed via #699, 💯