thelabdude commented on a change in pull request #247:
URL: https://github.com/apache/solr/pull/247#discussion_r682971005



##########
File path: solr/core/src/java/org/apache/solr/handler/sql/SolrFilter.java
##########
@@ -278,6 +265,24 @@ protected String translateComparison(RexNode node) {
       }
     }
 
+    private String toEqualsClause(String key, RexLiteral value, RexNode node) {
+      SqlTypeName fieldTypeName = ((RexCall) 
node).getOperands().get(0).getType().getSqlTypeName();
+      String terms = toSolrLiteralForEquals(value, fieldTypeName).trim();
+
+      boolean wrappedQuotes = false;
+      if (!terms.startsWith("(") && !terms.startsWith("[") && 
!terms.startsWith("{")) {
+        terms = "\"" + terms + "\"";
+        wrappedQuotes = true;

Review comment:
       if terms has a quote, the query breaks ... I think we should just fix 
this here vs. opening another PR though




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to