Package org.formulacompiler.compiler.internal.expressions

Examples of org.formulacompiler.compiler.internal.expressions.ExpressionNodeForFoldDatabase


    final FilterBuilder filterBuilder = new FilterBuilder();
    final DataType testedType = tested.getDataType();
    final ExpressionNode filter = filterBuilder.buildFilterByExample( 0, this.test, testedType );

    final ExpressionNodeForFoldDatabase apply;
    if (this.folded == null) {
      apply = new ExpressionNodeForFoldDatabase( this.fold, New.array( testedType ), this.colPrefix(), filter, 0,
          null, null, tested );
    }
    else {
      TypeAnnotator.annotateExpr( this.folded );
      final DataType foldedType = this.folded.getDataType();
      apply = new ExpressionNodeForFoldDatabase( this.fold, New.array( testedType, foldedType ), this.colPrefix(),
          filter, 1, null, null, vectorsToMatrix( tested, makeVertical( this.folded ) ) );
    }

    return filterBuilder.encloseFoldInLets( apply );
  }
View Full Code Here


    }

    final FilterBuilder filterBuilder = new FilterBuilder();
    final ExpressionNode filter = filterBuilder.buildFilter( critCols, critData, colTypes, firstRow );

    final ExpressionNodeForFoldDatabase apply = new ExpressionNodeForFoldDatabase( this.fold, colTypes, this
        .colPrefix(), filter, foldedColumnIndex, foldableColumnKeys, this.valueColumn, data );

    return filterBuilder.encloseFoldInLets( apply );
  }
View Full Code Here


  private void compileColumnSwitch( ExpressionNode _colIdxExpr ) throws CompilerException
  {
    final ExpressionCompilerForNumbers num = numericCompiler();
    final ExpressionNodeForFoldDatabase node = this.db;

    num.compileInt( _colIdxExpr );
    compileTableSwitch( node.foldableColumnKeys(), new TableSwitchGenerator()
    {

      @Override
      protected void generateCase( int _key, Label _end ) throws CompilerException
      {
        final int iCol = _key - 1;
        compileFixedColumnTraversal( iCol );
        mv().goTo( _end );
      }

      @Override
      protected void generateDefault() throws CompilerException
      {
        final ExpressionCompiler retCompiler = expressionCompiler( node.getDataType() );
        if (null != node.fold().whenEmpty()) {
          retCompiler.compile( node.fold().whenEmpty() );
        }
        else {
          retCompiler.compileZero();
        }
        mv().visitInsn( retCompiler.typeCompiler().returnOpcode() );
View Full Code Here

TOP

Related Classes of org.formulacompiler.compiler.internal.expressions.ExpressionNodeForFoldDatabase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.