Package org.apache.calcite.profile
Class ProfilerTest.Fluid
- java.lang.Object
-
- org.apache.calcite.profile.ProfilerTest.Fluid
-
- Enclosing class:
- ProfilerTest
private static class ProfilerTest.Fluid extends java.lang.Object
Fluid interface for writing profiler test cases.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
ProfilerTest.Fluid.StatisticToJson
Returns a function that converts a statistic to a JSON string.
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.util.function.Supplier<org.apache.calcite.profile.Profiler>
BETTER_FACTORY
private java.util.List<java.lang.String>
columns
private java.util.Comparator<org.apache.calcite.profile.Profiler.Statistic>
comparator
private CalciteAssert.Config
config
(package private) static java.util.List<java.lang.String>
DEFAULT_COLUMNS
(package private) static java.util.List<java.lang.String>
EXTENDED_COLUMNS
private java.util.function.Supplier<org.apache.calcite.profile.Profiler>
factory
private static java.util.function.Supplier<org.apache.calcite.profile.Profiler>
INCURIOUS_PROFILER_FACTORY
private int
limit
(package private) static com.google.common.collect.Ordering<org.apache.calcite.profile.Profiler.Statistic>
ORDERING
private java.util.function.Predicate<org.apache.calcite.profile.Profiler.Statistic>
predicate
private static java.util.function.Supplier<org.apache.calcite.profile.Profiler>
PROFILER_FACTORY
(package private) static java.util.function.Supplier<org.apache.calcite.profile.Profiler>
SIMPLE_FACTORY
private java.lang.String
sql
(package private) static java.util.function.Predicate<org.apache.calcite.profile.Profiler.Statistic>
STATISTIC_PREDICATE
-
Constructor Summary
Constructors Constructor Description Fluid(CalciteAssert.Config config, java.lang.String sql, java.util.function.Supplier<org.apache.calcite.profile.Profiler> factory, java.util.function.Predicate<org.apache.calcite.profile.Profiler.Statistic> predicate, java.util.Comparator<org.apache.calcite.profile.Profiler.Statistic> comparator, int limit, java.util.List<java.lang.String> columns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProfilerTest.Fluid
check(org.hamcrest.Matcher<java.lang.Iterable<java.lang.String>> matcher)
(package private) ProfilerTest.Fluid
config(CalciteAssert.Config config)
(package private) ProfilerTest.Fluid
factory(java.util.function.Supplier<org.apache.calcite.profile.Profiler> factory)
private org.apache.calcite.linq4j.Enumerator<java.util.List<java.lang.Comparable>>
getListEnumerator(java.sql.ResultSet r, int columnCount)
private org.apache.calcite.linq4j.Enumerable<java.util.List<java.lang.Comparable>>
getRows(java.sql.PreparedStatement s)
(package private) ProfilerTest.Fluid
limit(int limit)
(package private) ProfilerTest.Fluid
project(java.util.List<java.lang.String> columns)
(package private) ProfilerTest.Fluid
sort(com.google.common.collect.Ordering<org.apache.calcite.profile.Profiler.Statistic> comparator)
(package private) ProfilerTest.Fluid
unordered(java.lang.String... lines)
(package private) ProfilerTest.Fluid
where(java.util.function.Predicate<org.apache.calcite.profile.Profiler.Statistic> predicate)
-
-
-
Field Detail
-
SIMPLE_FACTORY
static final java.util.function.Supplier<org.apache.calcite.profile.Profiler> SIMPLE_FACTORY
-
BETTER_FACTORY
static final java.util.function.Supplier<org.apache.calcite.profile.Profiler> BETTER_FACTORY
-
ORDERING
static final com.google.common.collect.Ordering<org.apache.calcite.profile.Profiler.Statistic> ORDERING
-
STATISTIC_PREDICATE
static final java.util.function.Predicate<org.apache.calcite.profile.Profiler.Statistic> STATISTIC_PREDICATE
-
DEFAULT_COLUMNS
static final java.util.List<java.lang.String> DEFAULT_COLUMNS
-
EXTENDED_COLUMNS
static final java.util.List<java.lang.String> EXTENDED_COLUMNS
-
PROFILER_FACTORY
private static final java.util.function.Supplier<org.apache.calcite.profile.Profiler> PROFILER_FACTORY
-
INCURIOUS_PROFILER_FACTORY
private static final java.util.function.Supplier<org.apache.calcite.profile.Profiler> INCURIOUS_PROFILER_FACTORY
-
sql
private final java.lang.String sql
-
columns
private final java.util.List<java.lang.String> columns
-
comparator
private final java.util.Comparator<org.apache.calcite.profile.Profiler.Statistic> comparator
-
limit
private final int limit
-
predicate
private final java.util.function.Predicate<org.apache.calcite.profile.Profiler.Statistic> predicate
-
factory
private final java.util.function.Supplier<org.apache.calcite.profile.Profiler> factory
-
config
private final CalciteAssert.Config config
-
-
Constructor Detail
-
Fluid
Fluid(CalciteAssert.Config config, java.lang.String sql, java.util.function.Supplier<org.apache.calcite.profile.Profiler> factory, java.util.function.Predicate<org.apache.calcite.profile.Profiler.Statistic> predicate, java.util.Comparator<org.apache.calcite.profile.Profiler.Statistic> comparator, int limit, java.util.List<java.lang.String> columns)
-
-
Method Detail
-
config
ProfilerTest.Fluid config(CalciteAssert.Config config)
-
factory
ProfilerTest.Fluid factory(java.util.function.Supplier<org.apache.calcite.profile.Profiler> factory)
-
project
ProfilerTest.Fluid project(java.util.List<java.lang.String> columns)
-
sort
ProfilerTest.Fluid sort(com.google.common.collect.Ordering<org.apache.calcite.profile.Profiler.Statistic> comparator)
-
limit
ProfilerTest.Fluid limit(int limit)
-
where
ProfilerTest.Fluid where(java.util.function.Predicate<org.apache.calcite.profile.Profiler.Statistic> predicate)
-
unordered
ProfilerTest.Fluid unordered(java.lang.String... lines) throws java.lang.Exception
- Throws:
java.lang.Exception
-
check
public ProfilerTest.Fluid check(org.hamcrest.Matcher<java.lang.Iterable<java.lang.String>> matcher) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getRows
private org.apache.calcite.linq4j.Enumerable<java.util.List<java.lang.Comparable>> getRows(java.sql.PreparedStatement s)
-
getListEnumerator
private org.apache.calcite.linq4j.Enumerator<java.util.List<java.lang.Comparable>> getListEnumerator(java.sql.ResultSet r, int columnCount)
-
-