Skip to content

Commit 13bf115

Browse files
committed
address review comments
1 parent 080ab18 commit 13bf115

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

presto-clp/src/test/java/com/facebook/presto/plugin/clp/TestClpUdfRewriter.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public void testScanFilter()
148148
Plan plan = localQueryRunner.createPlan(
149149
session,
150150
"SELECT * FROM test WHERE CLP_GET_INT('user_id') = 0 AND CLP_GET_FLOAT('fare') < 50.0 AND CLP_GET_STRING('city') = 'SF' AND " +
151-
"CLP_GET_BOOL('isHoliday') = true AND cardinality(CLP_GET_STRING_ARRAY('tags')) > 0 AND LOWER(city.Name) = 'BEIJING'",
151+
"CLP_GET_BOOL('isHoliday') = true AND cardinality(CLP_GET_STRING_ARRAY('tags')) > 0 AND LOWER(city.Name) = 'beijing'",
152152
WarningCollector.NOOP);
153153
ClpUdfRewriter udfRewriter = new ClpUdfRewriter(functionAndTypeManager);
154154
PlanNode optimizedPlan = udfRewriter.optimize(plan.getRoot(), session.toConnectorSession(), variableAllocator, planNodeIdAllocator);
@@ -162,7 +162,7 @@ public void testScanFilter()
162162
new Plan(optimizedPlan, plan.getTypes(), StatsAndCosts.empty()),
163163
anyTree(
164164
filter(
165-
expression("lower(city.Name) = 'BEIJING' AND cardinality(tags) > 0"),
165+
expression("lower(city.Name) = 'beijing' AND cardinality(tags) > 0"),
166166
ClpTableScanMatcher.clpTableScanPattern(
167167
new ClpTableLayoutHandle(
168168
table,
@@ -236,7 +236,7 @@ public void testScanProjectFilter()
236236

237237
Plan plan = localQueryRunner.createPlan(
238238
session,
239-
"SELECT LOWER(city.Name), LOWER(CLP_GET_STRING('user')) from test WHERE CLP_GET_INT('user_id') = 0 AND LOWER(city.Name) = 'BEIJING'",
239+
"SELECT LOWER(city.Name), LOWER(CLP_GET_STRING('city.Name')) from test WHERE CLP_GET_INT('user_id') = 0 AND LOWER(city.Name) = 'beijing'",
240240
WarningCollector.NOOP);
241241
ClpUdfRewriter udfRewriter = new ClpUdfRewriter(functionAndTypeManager);
242242
PlanNode optimizedPlan = udfRewriter.optimize(plan.getRoot(), session.toConnectorSession(), variableAllocator, planNodeIdAllocator);
@@ -254,13 +254,13 @@ public void testScanProjectFilter()
254254
"lower",
255255
PlanMatchPattern.expression("lower(city.Name)"),
256256
"lower_0",
257-
PlanMatchPattern.expression("lower(user)")),
257+
PlanMatchPattern.expression("lower(city_dot__uxname)")),
258258
filter(
259-
expression("lower(city.Name) = 'BEIJING'"),
259+
expression("lower(city.Name) = 'beijing'"),
260260
ClpTableScanMatcher.clpTableScanPattern(
261261
new ClpTableLayoutHandle(table, Optional.of("(user_id: 0)"), Optional.empty()),
262262
ImmutableSet.of(
263-
new ClpColumnHandle("user", VARCHAR),
263+
new ClpColumnHandle("city.Name", VARCHAR),
264264
new ClpColumnHandle("user_id", BIGINT),
265265
city))))));
266266
}

0 commit comments

Comments
 (0)