Class 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)  
    • 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
    • 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

      • factory

        ProfilerTest.Fluid factory​(java.util.function.Supplier<org.apache.calcite.profile.Profiler> factory)
      • sort

        ProfilerTest.Fluid sort​(com.google.common.collect.Ordering<org.apache.calcite.profile.Profiler.Statistic> comparator)
      • 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)