Github user arina-ielchiieva commented on a diff in the pull request:
https://github.com/apache/drill/pull/560#discussion_r85957731
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/interpreter/InterpreterEvaluator.java
---
@@ -378,8 +388,14 @@ public ValueHolder
visitDoubleConstant(ValueExpressions.DoubleExpression dExpr,
}
@Override
- public ValueHolder
visitQuotedStringConstant(ValueExpressions.QuotedString e, Integer value)
throws RuntimeException {
- return
ValueHolderHelper.getVarCharHolder(getManagedBufferIfAvailable(), e.value);
+ public ValueHolder visitQuotedStringConstant(final
ValueExpressions.QuotedString e, Integer value) throws RuntimeException {
+ return getConstantValueHolder(e.value, new Function<DrillBuf,
ValueHolder>() {
--- End diff --
@jinfengni, code does not produce the same keys for decimal and string. We
pass different functions for each of them.
Example:
1. return ValueHolderHelper.getDecimal38Holder(buffer,
decExpr.getBigDecimal().toString());
2. return ValueHolderHelper.getVarCharHolder(buffer, e.value);
Only buffer is the same for string and decimal with the same value but this
is acceptable.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---