Package org.apache.derby.impl.sql.compile

Examples of org.apache.derby.impl.sql.compile.MaxMinAggregateDefinition


      throw StandardException.newException(SQLState.LANG_INVALID_USER_AGGREGATE_DEFINITION2, aggregateDefinitionClassName);
    }

    if (instance instanceof MaxMinAggregateDefinition)
    {
      MaxMinAggregateDefinition temp = (MaxMinAggregateDefinition)instance;
      if (aggregateName.equals("MAX"))
        temp.setMaxOrMin(true);
      else
        temp.setMaxOrMin(false);
    }

    if (instance instanceof SumAvgAggregateDefinition)
    {
      SumAvgAggregateDefinition temp1 = (SumAvgAggregateDefinition)instance;
View Full Code Here


      throw StandardException.newException(SQLState.LANG_INVALID_USER_AGGREGATE_DEFINITION2, aggregateDefinitionClassName);
    }

    if (instance instanceof MaxMinAggregateDefinition)
    {
      MaxMinAggregateDefinition temp = (MaxMinAggregateDefinition)instance;
      if (aggregateName.equals("MAX"))
        temp.setMaxOrMin(true);
      else
        temp.setMaxOrMin(false);
    }

    if (instance instanceof SumAvgAggregateDefinition)
    {
      SumAvgAggregateDefinition temp1 = (SumAvgAggregateDefinition)instance;
View Full Code Here

      throw StandardException.newException(SQLState.LANG_INVALID_USER_AGGREGATE_DEFINITION2, aggregateDefinitionClassName);
    }

    if (instance instanceof MaxMinAggregateDefinition)
    {
      MaxMinAggregateDefinition temp = (MaxMinAggregateDefinition)instance;
      if (aggregateName.equals("MAX"))
        temp.setMaxOrMin(true);
      else
        temp.setMaxOrMin(false);
    }

    if (instance instanceof SumAvgAggregateDefinition)
    {
      SumAvgAggregateDefinition temp1 = (SumAvgAggregateDefinition)instance;
View Full Code Here

      throw StandardException.newException(SQLState.LANG_INVALID_USER_AGGREGATE_DEFINITION2, aggregateDefinitionClassName);
    }

    if (instance instanceof MaxMinAggregateDefinition)
    {
      MaxMinAggregateDefinition temp = (MaxMinAggregateDefinition)instance;
      if (aggregateName.equals("MAX"))
        temp.setMaxOrMin(true);
      else
        temp.setMaxOrMin(false);
    }

    if (instance instanceof SumAvgAggregateDefinition)
    {
      SumAvgAggregateDefinition temp1 = (SumAvgAggregateDefinition)instance;
View Full Code Here

      throw StandardException.newException(SQLState.LANG_INVALID_USER_AGGREGATE_DEFINITION2, aggregateDefinitionClassName);
    }

    if (instance instanceof MaxMinAggregateDefinition)
    {
      MaxMinAggregateDefinition temp = (MaxMinAggregateDefinition)instance;
      if (aggregateName.equals("MAX"))
        temp.setMaxOrMin(true);
      else
        temp.setMaxOrMin(false);
    }

    if (instance instanceof SumAvgAggregateDefinition)
    {
      SumAvgAggregateDefinition temp1 = (SumAvgAggregateDefinition)instance;
View Full Code Here

      throw StandardException.newException(SQLState.LANG_INVALID_USER_AGGREGATE_DEFINITION2, aggregateDefinitionClassName);
    }

    if (instance instanceof MaxMinAggregateDefinition)
    {
      MaxMinAggregateDefinition temp = (MaxMinAggregateDefinition)instance;
      if (aggregateName.equals("MAX"))
        temp.setMaxOrMin(true);
      else
        temp.setMaxOrMin(false);
    }

    if (instance instanceof SumAvgAggregateDefinition)
    {
      SumAvgAggregateDefinition temp1 = (SumAvgAggregateDefinition)instance;
View Full Code Here

                    ascIndex = false;
                  break;
                }
              }
              FromBaseTable fbt = (FromBaseTable)tableVector.firstElement();
              MaxMinAggregateDefinition temp = (MaxMinAggregateDefinition)ad;

              /*  MAX   ASC      NULLABLE
                             *  ----  ----------
               *  TRUE  TRUE      TRUE/FALSE  =  Special Last Key Scan (ASC Index Last key with null skips)
               *  TRUE  FALSE     TRUE/FALSE  =  JustDisableBulk(DESC index 1st key with null skips)
               *  FALSE TRUE      TRUE/FALSE  = JustDisableBulk(ASC index 1st key)
               *  FALSE FALSE     TRUE/FALSE  = Special Last Key Scan(Desc Index Last Key)
               */

              if (((!temp.isMax()) && ascIndex) ||
                ((temp.isMax()) && !ascIndex))
              {
                fbt.disableBulkFetch();
                singleInputRowOptimization = true;
              }
              /*
              ** Max optimization with asc index or min with
              ** desc index is currently more
              ** restrictive than otherwise.
              ** We are getting the store to return the last
              ** row from an index (for the time being, the
              ** store cannot do real backward scans).  SO
              ** we cannot do this optimization if we have
              ** any predicates at all.
              */
              else if (!selectHasPredicates &&
                   ((temp.isMax() && ascIndex) ||
                    (!temp.isMax() && !ascIndex )))
              {
                fbt.disableBulkFetch();
                fbt.doSpecialMaxScan();
                singleInputRowOptimization = true;
              }
View Full Code Here

      throw StandardException.newException(SQLState.LANG_INVALID_USER_AGGREGATE_DEFINITION2, aggregateDefinitionClassName);
    }

    if (instance instanceof MaxMinAggregateDefinition)
    {
      MaxMinAggregateDefinition temp = (MaxMinAggregateDefinition)instance;
      if (aggregateName.equals("MAX"))
        temp.setMaxOrMin(true);
      else
        temp.setMaxOrMin(false);
    }

    if (instance instanceof SumAvgAggregateDefinition)
    {
      SumAvgAggregateDefinition temp1 = (SumAvgAggregateDefinition)instance;
View Full Code Here

      throw StandardException.newException(SQLState.LANG_INVALID_USER_AGGREGATE_DEFINITION2, aggregateDefinitionClassName);
    }

    if (instance instanceof MaxMinAggregateDefinition)
    {
      MaxMinAggregateDefinition temp = (MaxMinAggregateDefinition)instance;
      if (aggregateName.equals("MAX"))
        temp.setMaxOrMin(true);
      else
        temp.setMaxOrMin(false);
    }

    if (instance instanceof SumAvgAggregateDefinition)
    {
      SumAvgAggregateDefinition temp1 = (SumAvgAggregateDefinition)instance;
View Full Code Here

      throw StandardException.newException(SQLState.LANG_INVALID_USER_AGGREGATE_DEFINITION2, aggregateDefinitionClassName);
    }

    if (instance instanceof MaxMinAggregateDefinition)
    {
      MaxMinAggregateDefinition temp = (MaxMinAggregateDefinition)instance;
      if (aggregateName.equals("MAX"))
        temp.setMaxOrMin(true);
      else
        temp.setMaxOrMin(false);
    }

    if (instance instanceof SumAvgAggregateDefinition)
    {
      SumAvgAggregateDefinition temp1 = (SumAvgAggregateDefinition)instance;
View Full Code Here

TOP

Related Classes of org.apache.derby.impl.sql.compile.MaxMinAggregateDefinition

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.