Class Smalls

java.lang.Object
org.apache.calcite.util.Smalls

public class Smalls extends Object
Holder for various classes and functions used in tests as user-defined functions and so forth.
  • Field Details

    • GENERATE_STRINGS_METHOD

      public static final Method GENERATE_STRINGS_METHOD
    • GENERATE_STRINGS_OF_INPUT_SIZE_METHOD

      public static final Method GENERATE_STRINGS_OF_INPUT_SIZE_METHOD
    • GENERATE_STRINGS_OF_INPUT_MAP_SIZE_METHOD

      public static final Method GENERATE_STRINGS_OF_INPUT_MAP_SIZE_METHOD
    • MAZE_METHOD

      public static final Method MAZE_METHOD
    • MAZE2_METHOD

      public static final Method MAZE2_METHOD
    • MAZE3_METHOD

      public static final Method MAZE3_METHOD
    • MULTIPLICATION_TABLE_METHOD

      public static final Method MULTIPLICATION_TABLE_METHOD
    • FIBONACCI_TABLE_METHOD

      public static final Method FIBONACCI_TABLE_METHOD
    • FIBONACCI_LIMIT_100_TABLE_METHOD

      public static final Method FIBONACCI_LIMIT_100_TABLE_METHOD
    • FIBONACCI_LIMIT_TABLE_METHOD

      public static final Method FIBONACCI_LIMIT_TABLE_METHOD
    • FIBONACCI_INSTANCE_TABLE_METHOD

      public static final Method FIBONACCI_INSTANCE_TABLE_METHOD
    • DUMMY_TABLE_METHOD_WITH_TWO_PARAMS

      public static final Method DUMMY_TABLE_METHOD_WITH_TWO_PARAMS
    • DYNAMIC_ROW_TYPE_TABLE_METHOD

      public static final Method DYNAMIC_ROW_TYPE_TABLE_METHOD
    • VIEW_METHOD

      public static final Method VIEW_METHOD
    • STR_METHOD

      public static final Method STR_METHOD
    • STRING_UNION_METHOD

      public static final Method STRING_UNION_METHOD
    • PROCESS_CURSOR_METHOD

      public static final Method PROCESS_CURSOR_METHOD
    • PROCESS_CURSORS_METHOD

      public static final Method PROCESS_CURSORS_METHOD
    • MY_PLUS_EVAL_METHOD

      public static final Method MY_PLUS_EVAL_METHOD
    • MY_PLUS_INIT_EVAL_METHOD

      public static final Method MY_PLUS_INIT_EVAL_METHOD
  • Method Details

    • stringUnion

      public static <T> Queryable<T> stringUnion(Queryable<T> q0, Queryable<T> q1)
    • generateStrings

      public static QueryableTable generateStrings(Integer count)
      A function that generates a table that generates a sequence of Smalls.IntString values.
    • generateStringsOfInputSize

      public static QueryableTable generateStringsOfInputSize(List<Integer> list)
    • generateStringsOfInputMapSize

      public static QueryableTable generateStringsOfInputMapSize(Map<Integer,Integer> map)
    • multiplicationTable

      public static QueryableTable multiplicationTable(int ncol, int nrow, Integer offset)
      A function that generates multiplication table of ncol columns x nrow rows.
    • fibonacciTable

      public static ScannableTable fibonacciTable()
      A function that generates the Fibonacci sequence.

      Interesting because it has one column and no arguments, and because it is infinite.

    • fibonacciTableWithLimit100

      public static ScannableTable fibonacciTableWithLimit100()
      A function that generates the first 100 terms of the Fibonacci sequence.

      Interesting because it has one column and no arguments.

    • dummyTableFuncWithTwoParams

      public static ScannableTable dummyTableFuncWithTwoParams(long param1, long param2)
      A function that takes 2 param as input.
    • fibonacciTableWithLimit

      public static ScannableTable fibonacciTableWithLimit(long limit)
      A function that generates the Fibonacci sequence. Interesting because it has one column and no arguments.
    • dynamicRowTypeTable

      public static ScannableTable dynamicRowTypeTable(String jsonRowType, int rowCount)
    • processCursor

      public static QueryableTable processCursor(int offset, Enumerable<Object[]> a)
      Table function that adds a number to the first column of input cursor.
    • processCursors

      public static QueryableTable processCursors(int offset, Enumerable<Object[]> a, Enumerable<Smalls.IntString> b)
      A function that sums the second column of first input cursor, second column of first input and the given int.
    • view

      public static TranslatableTable view(String s)
    • strView

      public static TranslatableTable strView(String s)
    • str

      public static TranslatableTable str(Object o, Object p)