When you commit, please make sure the commit message is high quality. A commit 
message should never start with “fix bug when...” and should always start with 
a capital letter. 

Julian

> On Aug 31, 2018, at 6:55 PM, [email protected] wrote:
> 
> Repository: calcite
> Updated Branches:
>  refs/heads/master 2817bda61 -> 9589a3606
> 
> 
> [CALCITE-2498] fix bug when geode adapter quotes booleans as strings (Andrei 
> Sereda)
> 
> GeodeFilter was incorrectly quoting boolean literals as SQL strings ('true' 
> instead of true)
> 
> fixes #809
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
> Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/9589a360
> Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/9589a360
> Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/9589a360
> 
> Branch: refs/heads/master
> Commit: 9589a360656a752be73fb27ce285cd32b22bc0e0
> Parents: 2817bda
> Author: Andrei Sereda <[email protected]>
> Authored: Tue Aug 28 18:08:09 2018 -0400
> Committer: Vladimir Sitnikov <[email protected]>
> Committed: Sat Sep 1 04:55:29 2018 +0300
> 
> ----------------------------------------------------------------------
> .../java/org/apache/calcite/adapter/geode/rel/GeodeFilter.java    | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/calcite/blob/9589a360/geode/src/main/java/org/apache/calcite/adapter/geode/rel/GeodeFilter.java
> ----------------------------------------------------------------------
> diff --git 
> a/geode/src/main/java/org/apache/calcite/adapter/geode/rel/GeodeFilter.java 
> b/geode/src/main/java/org/apache/calcite/adapter/geode/rel/GeodeFilter.java
> index e4e5ac9..ca0b482 100644
> --- 
> a/geode/src/main/java/org/apache/calcite/adapter/geode/rel/GeodeFilter.java
> +++ 
> b/geode/src/main/java/org/apache/calcite/adapter/geode/rel/GeodeFilter.java
> @@ -36,6 +36,7 @@ import java.util.ArrayList;
> import java.util.Collections;
> import java.util.List;
> 
> +import static org.apache.calcite.sql.type.SqlTypeName.BOOLEAN_TYPES;
> import static org.apache.calcite.sql.type.SqlTypeName.CHAR;
> import static org.apache.calcite.sql.type.SqlTypeName.NUMERIC_TYPES;
> 
> @@ -225,7 +226,7 @@ public class GeodeFilter extends Filter implements 
> GeodeRel {
>     private String translateOp2(String op, String name, RexLiteral right) {
>       String valueString = literalValue(right);
>       SqlTypeName typeName = rowType.getField(name, true, 
> false).getType().getSqlTypeName();
> -      if (NUMERIC_TYPES.contains(typeName)) {
> +      if (NUMERIC_TYPES.contains(typeName) || 
> BOOLEAN_TYPES.contains(typeName)) {
>         // leave the value as it is
>       } else if (typeName != SqlTypeName.CHAR) {
>         valueString = "'" + valueString + "'";
> 

Reply via email to