From 91702401dd8e68b58e7e948fe9cf0bec7cd73082 Mon Sep 17 00:00:00 2001 From: yrizhkov Date: Sun, 13 Jun 2021 09:12:08 +0300 Subject: [PATCH] handle boolean values in parseComparable --- .../aerospike/jdbc/query/ExpressionBuilder.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/aerospike/jdbc/query/ExpressionBuilder.java b/src/main/java/com/aerospike/jdbc/query/ExpressionBuilder.java index 7c67294..f3ba3a3 100644 --- a/src/main/java/com/aerospike/jdbc/query/ExpressionBuilder.java +++ b/src/main/java/com/aerospike/jdbc/query/ExpressionBuilder.java @@ -110,18 +110,18 @@ private static Pair parseComparable(WhereExpression whereExpression) { ); } catch (NumberFormatException ignore) { } -// if (value.equalsIgnoreCase("true") || -// value.equalsIgnoreCase("false")) { -// return new Pair<>( -// Exp.boolBin(whereExpression.getColumn()), // TODO will be available with the next client version -// Exp.val(Boolean.parseBoolean(value)) -// ); -// } else { + if (value.equalsIgnoreCase("true") || + value.equalsIgnoreCase("false")) { + return new Pair<>( + Exp.boolBin(whereExpression.getColumn()), + Exp.val(Boolean.parseBoolean(value)) + ); + } else { return new Pair<>( Exp.stringBin(whereExpression.getColumn()), Exp.val(value) ); -// } + } } }