public static class QueryBuilder.PlanMatcher extends Object
match() method call, matches given patterns to the query plan.| Constructor and Description |
|---|
PlanMatcher(String plan) |
| Modifier and Type | Method and Description |
|---|---|
QueryBuilder.PlanMatcher |
exclude(String... patterns) |
QueryBuilder.PlanMatcher |
include(String... patterns) |
void |
match()
Checks if stored patterns (string parts) are included or excluded in the given plan.
|
public PlanMatcher(String plan)
public QueryBuilder.PlanMatcher include(String... patterns)
public QueryBuilder.PlanMatcher exclude(String... patterns)
public void match()
00-00 Screen
00-01 Project(cnt=[$0])
00-02 DirectScan(groupscan=[selectionRoot = classpath:/tpch/nation.parquet,
numFiles = 1, usedMetadataSummaryFile = false, DynamicPojoRecordReader{records = [[25]]}])
planMatcher.include("numFiles = 1", "DynamicPojoRecordReader")planMatcher.exclude("usedMetadataSummaryFile = true")planMatcher.match() method would check that given patterns are present
or absent in the given plan. Method execution will fail with AssertionError
only if expected pattern was not matched or unexpected pattern was matched.Copyright © 2021 The Apache Software Foundation. All rights reserved.