Package org.apache.calcite.util
Provides utility classes.
-
Interface Summary Interface Description CalciteParserException Tagging interface to allow aSqlParseException
to be identified without adding a dependency on it from client-side code.CalciteValidatorException Tagging interface to allow aSqlValidatorException
to be identified without adding a dependency on it from client-side code.ClosableAllocation ClosableAllocation represents an object which requires a call in order to release resources early rather than waiting for finalization.ClosableAllocationOwner ClosableAllocationOwner represents an object which can take ownership of ClosableAllocations and guarantee that they will be cleaned up correctly when its own closeAllocation() is called.Glossary A collection of terms.IntegerIntervalSet.Handler A callback.Litmus Callback to be called when a test for validity succeeds or fails.PartiallyOrderedSet.Ordering<E> Ordering relation.PrecedenceClimbingParser.Special Callback defining the behavior of a special function.ReflectiveVisitDispatcher<R extends ReflectiveVisitor,E> Interface for looking up methods relating to reflective visitation.ReflectiveVisitor Object which can be a target for a reflective visitation (seeReflectUtil.invokeVisitor(ReflectiveVisitor, Object, Class, String)
.ReflectUtil.MethodDispatcher<T> Can invoke a method on an object of type E with return type T.SaffronProperties Provides an environment for debugging information, et cetera, used by saffron.Source Source of data.TryThreadLocal.Memo Remembers to set the value back. -
Class Summary Class Description BarfingInvocationHandler A class derived fromBarfingInvocationHandler
handles a method call by looking for a method in itself with identical parameters.Benchmark Helps to run benchmarks by running the same task repeatedly and averaging the running times.Benchmark.Statistician Collects statistics for a test that is run multiple times.BitSets Utility functions forBitSet
.BitSets.Closure Setup equivalence Sets for each position.BitString String of bits.Bug Holder for a list of constants describing which bugs which have not been fixed.CancelFlag CancelFlag is used to post and check cancellation requests.CaseInsensitiveComparator Comparator that compares all strings differently, but if two strings are equal in case-insensitive match they are right next to each other.CaseInsensitiveComparator.Key Enables to create floor and ceiling keys for given string.CastingList<E> Converts a list whose members are automatically down-cast to a given type.ChunkList<E> Implementation of list similar toLinkedList
, but stores elements in chunks of 32 elements.Closer Helper that holds ontoAutoCloseable
resources and releases them when its#close
method is called.CompositeList<T> Read-only list that is the concatenation of sub-lists.CompositeMap<K,V> Unmodifiable view onto multiple backing maps.CompoundClosableAllocation CompoundClosableAllocation represents a collection of ClosableAllocations which share a common lifecycle.ConversionUtil Utility functions for converting from one type to anotherDateString Date literal.DateTimeStringUtils Utility methods to manipulate String representation of DateTime values.DelegatingInvocationHandler A class derived fromDelegatingInvocationHandler
handles a method call by looking for a method in itself with identical parameters.EquivalenceSet<E extends java.lang.Comparable<E>> Set of elements organized into equivalence classes.Filterator<E> Filtered iterator class: an iterator that includes only elements that are instanceof a specified class.Holder<E> A mutable slot that can contain one object.ImmutableBitSet An immutable list of bits.ImmutableBitSet.Builder Builder.ImmutableBitSet.Closure Setup equivalence Sets for each position.ImmutableBitSet.Rebuilder Refinement ofImmutableBitSet.Builder
that remembers its originalImmutableBitSet
and tries to use it whenImmutableBitSet.Rebuilder.build()
is called.ImmutableIntList An immutable list ofInteger
values backed by an array ofint
s.ImmutableIntList.AbstractIndexedListIterator<E> Extension toUnmodifiableListIterator
that operates by index.ImmutableIntList.EmptyImmutableIntList Special sub-class ofImmutableIntList
that is always empty and has only one instance.ImmutableNullableList<E> An immutable list that may contain null values.ImmutableNullableList.Builder<E> A builder for creating immutable nullable list instances.IntegerIntervalSet A set of non-negative integers defined by a sequence of points, intervals, and exclusions.IntList Deprecated. JsonBuilder Builder for JSON documents (represented asList
,Map
,String
,Boolean
,Long
).NameMap<V> Map whose keys are names and can be accessed with and without case sensitivity.NameMultimap<V> Multimap whose keys are names and can be accessed with and without case sensitivity.NameSet Set of names that can be accessed with and without case sensitivity.NlsString A string, optionally withcharacter set
andSqlCollation
.NumberUtil Utility functions for working with numbers.Pair<T1,T2> Pair of objects.Pair.AdjacentIterator<E> Iterator that returns consecutive pairs of elements from an underlying iterator.Pair.FirstAndIterator<E> Iterator that returns the first element of a collection paired with every other element.Pair.LeftIterator<L,R> Iterator that returns the left field of each pair.Pair.RightIterator<L,R> Iterator that returns the right field of each pair.Pair.ZipIterator<L,R> Iterator that pairs elements from two iterators.PartiallyOrderedSet<E> Partially-ordered set.PartiallyOrderedSet.Node<E> Holds a value, its parent nodes, and child nodes.PartiallyOrderedSet.TopBottomNode<E> Subclass of Node for top/bottom nodes.Permutation Represents a mapping which reorders elements in an array.PrecedenceClimbingParser Parser that takes a collection of tokens (atoms and operators) and groups them together according to the operators' precedence and associativity.PrecedenceClimbingParser.Builder Fluent helper to build a parser containing a list of tokens.PrecedenceClimbingParser.Call A token that is a call to an operator with arguments.PrecedenceClimbingParser.Op An operator token.PrecedenceClimbingParser.Result PrecedenceClimbingParser.SpecialOp An token corresponding to a special operator.PrecedenceClimbingParser.Token A token: either an atom, a call to an operator with arguments, or an unmatched operator.ReflectUtil Static utilities for Java reflection.SaffronProperties.Helper Helper class.SerializableCharset Serializable wrapper around aCharset
.Sources Utilities forSource
.Sources.FileSource Implementation ofSource
.SourceStringReader Extension toStringReader
that allows the original string to be recovered.Stacks Deprecated. StackWriter A helper class for generating formatted text.Static Definitions of objects to be statically imported.Template String template.TimestampString Timestamp literal.TimestampWithTimeZoneString Timestamp with time-zone literal.TimeString Time literal.TimeWithTimeZoneString Time with time-zone literal.TryThreadLocal<T> Thread-local variable that returns a handle that can be closed.UnmodifiableArrayList<E> A view onto an array that cannot be modified by the client.Unsafe Contains methods that call JDK methods that the forbidden APIs checker does not approve of.Util Miscellaneous utility functions.Util.FilteringIterator<T> Iterator that applies a predicate to each element.Util.OverFinder Visitor which looks for an OVER clause inside a tree ofSqlNode
objects.Util.RandomAccessTransformingList<F,T> Extension toUtil.TransformingList
that implementsRandomAccess
.Util.TransformingList<F,T> List that returns the same number of elements as a backing list, applying a transformation function to each one.XmlOutput Streaming XML output.XmlOutput.StringEscaper Utility for replacing special characters with escape sequences in strings.XmlOutput.XMLAttrVector List of attribute names and values. -
Enum Summary Enum Description BuiltInMethod Built-in methods.Optionality Four states that describe whether a particular behavior or property is allowed and/or not allowed.PrecedenceClimbingParser.Type Token type. -
Exception Summary Exception Description ControlFlowException Exception intended to be used for control flow, as opposed to the usual use of exceptions which is to signal an error condition.Util.FoundOne Exception used to interrupt a tree walk of any kind.