Jackie-Jiang commented on a change in pull request #6808:
URL: https://github.com/apache/incubator-pinot/pull/6808#discussion_r616339874
##########
File path:
pinot-core/src/test/java/org/apache/pinot/core/operator/transform/function/CaseTransformFunctionTest.java
##########
@@ -112,25 +110,13 @@ private void testCaseQueryWithDoubleResults(String
predicate, double[] expectedV
private void testCaseQueryWithStringResults(String predicate, String[]
expectedValues) {
ExpressionContext expression =
- RequestContextUtils.getExpression(String.format("CASE(%s, 'aaa',
'bbb')", predicate));
+ RequestContextUtils.getExpressionFromSQL(String.format("CASE WHEN %s
THEN 'aaa' ELSE 'bbb' END", predicate));
TransformFunction transformFunction =
TransformFunctionFactory.get(expression, _dataSourceMap);
Assert.assertTrue(transformFunction instanceof CaseTransformFunction);
Assert.assertEquals(transformFunction.getName(),
CaseTransformFunction.FUNCTION_NAME);
testTransformFunction(transformFunction, expectedValues);
}
- @Test(dataProvider = "testIllegalArguments", expectedExceptions =
{BadQueryRequestException.class})
Review comment:
These illegal arguments are not valid sql expression, and the parser
will throw `SqlParseException`. The purpose of this test is not to test the sql
parser, thus removed the test.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]