Package net.sf.farrago.fennel.calc

Builds programs for the Fennel calculator.

See:
          Description

Interface Summary
CalcProgramBuilder.Operand Represents an Operand in an opereation e.g.
CalcRexAggImplementor Translates a call to an aggregate function to calculator assembly language.
CalcRexImplementor Translates a call to a particular operator to calculator assembly language.
CalcRexImplementorTable Contains, for each operator, an implementor which can convert a call to that operator into a set of calculator instructions.
 

Class Summary
CalcProgramBuilder Constructs a calculator assembly language program based upon a series of calls made by the client.
CalcProgramBuilder.BoolInstructionDef  
CalcProgramBuilder.BoolNativeInstructionDef  
CalcProgramBuilder.ComparisonInstructionDef  
CalcProgramBuilder.ExtInstrDef Defines an extended instruction.
CalcProgramBuilder.ExtInstrSizeDef Defines an extended instruction with name depending on the number or operands.
CalcProgramBuilder.FunctionCall Holds and represents the parameters for a call to an operator
CalcProgramBuilder.InstructionDef Definition for an instruction.
CalcProgramBuilder.IntegralNativeInstructionDef  
CalcProgramBuilder.IntegralNativeShift  
CalcProgramBuilder.JumpInstructionDef  
CalcProgramBuilder.Line Reference to a line number
CalcProgramBuilder.LiteralPair A key-value pair class to hold
1) Value of a literal and
2) Type of a literal
For use in a hashtable
CalcProgramBuilder.NativeInstructionDef  
CalcProgramBuilder.PointerBoolInstructionDef  
CalcProgramBuilder.RegisterDescriptor  
CalcProgramBuilderTest Unit test for CalcProgramBuilder.
CalcReg Represents a virtual register.
CalcRexImplementorTableImpl Implementation of CalcRexImplementorTable, containing implementations for all standard functions.
CalcRexImplementorTableImpl.AbstractCalcRexAggImplementor Abstract base class for classes which implement CalcRexAggImplementor.
CalcRexImplementorTableImpl.AbstractCalcRexImplementor Abstract base class for classes which implement CalcRexImplementor.
CalcRexImplementorTableImpl.AddCharSetNameInstrImplementor A Class that gets a specified operand of a call and retrieves its charset name and add it as a vc literal to the program.
CalcRexImplementorTableImpl.BinaryNumericMakeSametypeImplementor Makes all numeric types the same before calling a given instruction.
CalcRexImplementorTableImpl.BinaryStringMakeSametypeImplementor Makes all string types the same before calling a given instruction.
CalcRexImplementorTableImpl.CaseImplementor Implementor for CASE operator.
CalcRexImplementorTableImpl.CastDecimalImplementor Implementor for casting between char and decimal types.
CalcRexImplementorTableImpl.CastImplementor Implementor for CAST operator.
CalcRexImplementorTableImpl.CastTimestampToDateImplementor Implementor for casting from TIMESTAMP to DATE.
CalcRexImplementorTableImpl.CastTimestampToTimeImplementor Implementor for casting from TIMESTAMP to TIME.
CalcRexImplementorTableImpl.CastTimeToTimestampImplementor Implementor for casting from TIME to TIMESTAMP.
CalcRexImplementorTableImpl.ConcatImplementor  
CalcRexImplementorTableImpl.CountCalcRexImplementor Implementation of the COUNT aggregate function, SqlStdOperatorTable.countOperator.
CalcRexImplementorTableImpl.DatetimeRoundingImplementor Helper to implement CAST to TIMESTAMP or TIME values.
CalcRexImplementorTableImpl.DoubleKeyMap  
CalcRexImplementorTableImpl.FirstValueCalcRexImplementor Implementation of the FIST_VALUE aggregate function, SqlStdOperatorTable.sumOperator.
CalcRexImplementorTableImpl.HistogramAggRexImplementor Implementation of the $HISTOGRAM aggregate function (SqlStdOperatorTable.histogramAggFunction, which helps implement MIN, MAX, FIRST_VALUE, LAST_VALUE in a windowed aggregation scenario.
CalcRexImplementorTableImpl.HistogramResultRexImplementor Implementation of the operators which extract a result from a histogram: $HISTOGRAM_MIN, $HISTOGRAM_MAX, $HISTOGRAM_FIRST_VALUE, $HISTOGRAM_LAST_VALUE
CalcRexImplementorTableImpl.IdentityImplementor Implements the identity operator.
CalcRexImplementorTableImpl.InstrDefImplementor Generic implementor that takes a CalcProgramBuilder.InstructionDef which implements an operator by generating a call to a given instruction.
CalcRexImplementorTableImpl.IsBoolImplementor Implements "IS TRUE" and "IS FALSE" operators.
CalcRexImplementorTableImpl.IsNotBoolImplementor Implements "IS NOT TRUE" and "IS NOT FALSE" operators.
CalcRexImplementorTableImpl.LastValueCalcRexImplementor Implementation of the LAST_VALUE aggregate function, SqlStdOperatorTable.sumOperator.
CalcRexImplementorTableImpl.MakeOperandsDoubleImplementor Implementor that will convert a RexCall's operands to approx DOUBLE if needed
CalcRexImplementorTableImpl.MinMaxCalcRexImplementor Implementation of the MIN and MAX aggregate function, SqlStdOperatorTable.sumOperator.
CalcRexImplementorTableImpl.ReinterpretCastImplementor Implementor for REINTERPRET operator.
CalcRexImplementorTableImpl.SliceImplementor Implements the internal $SLICE operator.
CalcRexImplementorTableImpl.SumCalcRexImplementor Implementation of the SUM aggregate function, SqlStdOperatorTable.sumOperator.
CalcRexImplementorTableImpl.SumEmptyIsZeroCalcRexImplementor Implementation of the SUM0 aggregate function, SqlStdOperatorTable.sumEmptyIsZeroOperator.
CalcRexImplementorTableImpl.TimeFunctionImplementor  
CalcRexImplementorTableImpl.TrimImplementor Implements the TRIM function.
CalcRexImplementorTableImpl.UsingInstrImplementor Implements a call by invoking a given instruction.
ExtInstructionDefTable A class that holds CalcProgramBuilder.ExtInstrDef and its sub-classes.
RexToCalcTranslator Converts expressions in logical format (RexNode) into calculator assembly-language programs.
 

Enum Summary
AggOp Enumeration of aggregate operations to be performed on aggregation buckets for windowed or streaming aggregation.
CalcProgramBuilder.OpType Enumeration of the types supported by the calculator.
CalcProgramBuilder.RegisterSetType Enumeration of register types
 

Exception Summary
RexToCalcTranslator.TranslationException Trivial exception thrown when RexToCalcTranslator.TranslationTester finds a node it cannot translate.
 

Package net.sf.farrago.fennel.calc Description

Builds programs for the Fennel calculator.

 

Revision $Id: //open/dev/farrago/src/net/sf/farrago/fennel/calc/package.html#1 $
Copyright Copyright (C) 2005-2009 The Eigenbase Project
Copyright (C) 2004-2009 SQLstream, Inc.
Copyright (C) 2009-2009 LucidEra, Inc.
Author Julian Hyde

A CalcProgramBuilder contains methods to construct calculator program, then serialize it as an 'assembly language' string.

Related packages