Details
Description
As reported on StackOverflow if a variable used as part of the math() step contains a reserved word such as "exp" the evaluation of the expression fails. For example
math('number1-expected_value').next()
results in
*GremlinServerError: 499: {"detailedMessage":"Unknown function or variable 'cted_value' at pos 20 in expression 'number1 - expected_value'","requestId":"01e3f9e6-3cf2-4af0-bf94-5a4979d488b4","code":"InvalidParameterException"}*
I am able to reproduce this in the Gremlin Console using TinkerPop version 3.6.0 using:{}
gremlin> g.inject(1).as('expa').constant(2).as('c').math('c - expa') Unknown function or variable 'a' at pos 7 in expression 'c - expa' Type ':help' or ':h' for help. Display stack trace? [yN] gremlin> g.inject(1).as('a').constant(2).as('c').math('c - a') ==>1.0