Paul Rogers created DRILL-6370: ---------------------------------- Summary: Mod operator % is documented, but not available Key: DRILL-6370 URL: https://issues.apache.org/jira/browse/DRILL-6370 Project: Apache Drill Issue Type: Bug Affects Versions: 1.13.0 Reporter: Paul Rogers
The [Operators|http://drill.apache.org/docs/operators/] page in the documentation states that the {{%}} operator does modulo division. The first issue is that {{%}} is listed in the precedence table, but not the math operator table. Suppose we try to use the operator: {noformat} SELECT 10 % 3 FROM (VALUES(1)); Error: PARSE ERROR: Percent remainder '%' is not allowed under the current SQL conformance level {noformat} It seems that if we list the operator, we should support it. Or, failing that, add a note to say that the {{%}} operator is not currently supported. The workaround is to use the {{mod()}} function: {noformat} SELECT mod(10, 3) FROM (VALUES(1)); +---------+ | EXPR$0 | +---------+ | 1 | +---------+ {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)