Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instant Column gRPC Filters: Fix Range Quick Filters and use MatchFilter over ConditionFilter #5671

Merged
merged 3 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private WhereFilter generateNumericConditionFilter(CompareCondition.CompareOpera
valueString = Long.toString(value.getLongValue());
break;
case NANO_TIME_VALUE:
valueString = Long.toString(value.getNanoTimeValue());
valueString = String.format("'%d'", value.getNanoTimeValue());
nbauernfeind marked this conversation as resolved.
Show resolved Hide resolved
break;
case VALUE_NOT_SET:
default:
Expand Down Expand Up @@ -184,8 +184,7 @@ public WhereFilter onIn(Value target, List<Value> candidatesList, CaseSensitivit
Literal literal = d.getLiteral();
// all other literals get created from a toString except DateTime
if (literal.getValueCase() == Literal.ValueCase.NANO_TIME_VALUE) {
values[i] = "'" + DateTimeUtils.formatDateTime(
DateTimeUtils.epochNanosToInstant(literal.getNanoTimeValue()), DateTimeUtils.timeZone()) + "'";
values[i] = String.format("'%d'", literal.getNanoTimeValue());
nbauernfeind marked this conversation as resolved.
Show resolved Hide resolved
} else {
values[i] = FilterPrinter.printNoEscape(literal);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ private void onLiteral(Literal literal) {
sb.append(literal.getLongValue());
break;
case NANO_TIME_VALUE:
sb.append("DateTimeUtils.epochNanosToInstant(").append(literal.getNanoTimeValue()).append(")");
sb.append("'").append(literal.getNanoTimeValue()).append("'");
break;
case VALUE_NOT_SET:
default:
Expand Down
Loading