amrishlal commented on a change in pull request #7568:
URL: https://github.com/apache/pinot/pull/7568#discussion_r746092017
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/plan/FilterPlanNode.java
##########
@@ -217,9 +216,9 @@ private BaseFilterOperator
constructPhysicalOperator(FilterContext filter) {
return
FilterOperatorUtils.getLeafFilterOperator(predicateEvaluator, dataSource,
_numDocs);
case JSON_MATCH:
JsonIndexReader jsonIndex = dataSource.getJsonIndex();
- Preconditions.checkState(jsonIndex != null, "Cannot apply
JSON_MATCH on column: %s without json index",
- column);
- return new JsonMatchFilterOperator(jsonIndex,
((JsonMatchPredicate) predicate).getValue(), _numDocs);
+ Preconditions
+ .checkState(jsonIndex != null, "Cannot apply JSON_MATCH on
column: %s without json index", column);
Review comment:
Fixed.
##########
File path:
pinot-broker/src/test/java/org/apache/pinot/broker/requesthandler/LiteralOnlyBrokerRequestTest.java
##########
@@ -177,4 +177,55 @@ public void testBrokerRequestHandlerWithAsFunction()
Assert.assertEquals(brokerResponse.getResultTable().getRows().get(0)[1],
1577836800000L);
Assert.assertEquals(brokerResponse.getTotalDocs(), 0);
}
+
+ /** Tests for EXPLAIN PLAN for literal only queries. */
+ @Test
+ public void testExplainPlanLiteralOnly()
+ throws Exception {
+ SingleConnectionBrokerRequestHandler requestHandler =
+ new SingleConnectionBrokerRequestHandler(new PinotConfiguration(),
null, ACCESS_CONTROL_FACTORY, null, null,
+ new BrokerMetrics("", PinotMetricUtils.getPinotMetricsRegistry(),
true, Collections.emptySet()), null);
+
+ // Test 1: select constant
+ JsonNode request = new ObjectMapper().readTree("{\"sql\":\"EXPLAIN PLAN
FOR SELECT 1.5, 'test'\"}");
Review comment:
Fixed.
--
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]