Skip to content

Commit

Permalink
Fixes from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusmelke committed Aug 23, 2018
1 parent 78c3a35 commit 2d893f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ class ExpressionConverters(converters: ExpressionConverter*) {
throw new InternalException(s"Unknown projection type during transformation ($projections)")
}

//ctx.setRefAt(1,map.get("foo"))
//ctx.setRefAt(4,map.get("bar"))
//ctx.setRefAt(5,map.get("baz"))
//ctx.setRefAt(6,map.get("foo"))
//ctx.setRefAt(42,map.get("foo"))

def toCommandPredicate(id: Id, in: ast.Expression): Predicate = in match {
case e: ast.PatternExpression => predicates.NonEmpty(toCommandExpression(id, e))
case e: ast.FilterExpression => predicates.NonEmpty(toCommandExpression(id, e))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,8 @@ class IntermediateCodeGeneration(slots: SlotConfiguration) {
constant(name)))
Some(IntermediateExpression(load(parameterVariable), Seq.empty, Seq(local), Set(equal(load(parameterVariable), noValue))))

case Property(mapExpression, PropertyKeyName(key)) =>
for (map <- compileExpression(mapExpression)) yield {
case Property(targetExpression, PropertyKeyName(key)) =>
for (map <- compileExpression(targetExpression)) yield {
val variableName = namer.nextVariableName()
val local = variable[AnyValue](variableName,
ternary(map.nullCheck.reduceLeft((acc,current) => or(acc, current)), noValue,
Expand Down Expand Up @@ -1006,7 +1006,6 @@ class IntermediateCodeGeneration(slots: SlotConfiguration) {
}

case p =>
println(p)
None
}

Expand Down

0 comments on commit 2d893f8

Please sign in to comment.