Class Codes.SetRowSink

java.lang.Object
net.hydromatic.morel.eval.Codes.BaseRowSink
net.hydromatic.morel.eval.Codes.SetRowSink
All Implemented Interfaces:
Codes.RowSink, Describable
Direct Known Subclasses:
Codes.ExceptAllRowSink, Codes.ExceptDistinctRowSink, Codes.IntersectAllRowSink, Codes.IntersectDistinctRowSink, Codes.UnionRowSink
Enclosing class:
Codes

abstract static class Codes.SetRowSink extends Codes.BaseRowSink
Implementation of Codes.RowSink for an except, intersect, or union step.
  • Field Details

    • ZERO

      private static final int[] ZERO
    • op

      final Op op
    • distinct

      final boolean distinct
    • codes

      final com.google.common.collect.ImmutableList<Code> codes
    • names

      final com.google.common.collect.ImmutableList<String> names
    • map

      final Map<Object,int[]> map
    • values

      final Object[] values
  • Constructor Details

    • SetRowSink

      SetRowSink(Op op, boolean distinct, com.google.common.collect.ImmutableList<Code> codes, com.google.common.collect.ImmutableList<String> names, Codes.RowSink rowSink)
  • Method Details

    • describe

      public Describer describe(Describer describer)
    • add

      boolean add(EvalEnv env)
      Adds the current element to the collection, and returns whether it was added.
    • remove

      void remove(EvalEnv env)
      Removes the current element from the collection.
    • inc

      void inc(EvalEnv env)
      Increments the count of the current element in the collection.
    • dec

      void dec(EvalEnv env)
      Decrements the count of the current element in the collection, if it is present.
    • compute

      void compute(EvalEnv env, BiFunction<Object,int[],int[]> fn)
      Does something to the count of the current element in the collection.
    • computeIfPresent

      void computeIfPresent(EvalEnv env, BiFunction<Object,int[],int[]> fn)
      Does something to the count of the current element in the collection.
    • computeIfAbsent

      void computeIfAbsent(EvalEnv env, Function<Object,int[]> fn)
      Does something to the count of the current element in the collection.