Commit 8612a451 by Harish Butani

fix fieldName generation in ComparisonExpression

parent 1d0dcc02
...@@ -214,8 +214,10 @@ class GremlinTranslator(expr: Expression, ...@@ -214,8 +214,10 @@ class GremlinTranslator(expr: Expression,
} }
case c@ComparisonExpression(symb, f@FieldExpression(fieldName, fInfo, ch), l) => { case c@ComparisonExpression(symb, f@FieldExpression(fieldName, fInfo, ch), l) => {
ch match { ch match {
case Some(child) => case Some(child) => {
s"""${genQuery(child, inSelect)}.has("$fieldName", ${gPersistenceBehavior.gremlinCompOp(c)}, $l)""" val fieldGremlinExpr = s"${gPersistenceBehavior.fieldNameInVertex(fInfo.dataType, fInfo.attrInfo)}"
s"""${genQuery(child, inSelect)}.has("$fieldGremlinExpr", ${gPersistenceBehavior.gremlinCompOp(c)}, $l)"""
}
case None => s"""has("$fieldName", ${gPersistenceBehavior.gremlinCompOp(c)}, $l)""" case None => s"""has("$fieldName", ${gPersistenceBehavior.gremlinCompOp(c)}, $l)"""
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment