Examples of Limit


Examples of lupos.engine.operators.singleinput.modifiers.Limit

    connection.connectAndSetAsNewOperatorConnection(new Sort(node));
  }

  @Override
  public void visit(final ASTLimit node, final OperatorConnection connection) {
    connection.connectAndSetAsNewOperatorConnection(new Limit(node.getLimit()));
  }
View Full Code Here

Examples of net.sf.jsqlparser.statement.select.Limit

        List distinctOn = null;
        Expression where = null;
        List orderByElements;
        List groupByColumnReferences = null;
        Expression having = null;
        Limit limit = null;
        Top top = null;
    jj_consume_token(K_SELECT);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case K_ALL:
    case K_DISTINCT:
View Full Code Here

Examples of net.sf.jsqlparser.statement.select.Limit

  }

  final public Union Union() throws ParseException {
        Union union = new Union();
        List orderByElements = null;
        Limit limit = null;
        PlainSelect select = null;
        ArrayList selects = new ArrayList();
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 79:
      jj_consume_token(79);
View Full Code Here

Examples of net.sf.jsqlparser.statement.select.Limit

                {if (true) return orderByElement;}
    throw new Error("Missing return statement in function");
  }

  final public Limit Limit() throws ParseException {
        Limit limit = new Limit();
        Token token = null;
    if (jj_2_8(3)) {
      jj_consume_token(K_LIMIT);
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case S_INTEGER:
        token = jj_consume_token(S_INTEGER);
                                                                    limit.setOffset(Long.parseLong(token.image));
        break;
      case 83:
        jj_consume_token(83);
                                                      limit.setOffsetJdbcParameter(true);
        break;
      default:
        jj_la1[71] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      jj_consume_token(78);
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case S_INTEGER:
        token = jj_consume_token(S_INTEGER);
                                                    limit.setRowCount(Long.parseLong(token.image));
        break;
      case 83:
        jj_consume_token(83);
                                                                                                              limit.setRowCountJdbcParameter(true);
        break;
      default:
        jj_la1[72] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    } else {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case K_OFFSET:
        jj_consume_token(K_OFFSET);
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case S_INTEGER:
          token = jj_consume_token(S_INTEGER);
                                                      limit.setOffset(Long.parseLong(token.image));
          break;
        case 83:
          jj_consume_token(83);
                                                                                                              limit.setOffsetJdbcParameter(true);
          break;
        default:
          jj_la1[73] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
        break;
      case K_LIMIT:
        jj_consume_token(K_LIMIT);
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case S_INTEGER:
          token = jj_consume_token(S_INTEGER);
                                                            limit.setRowCount(Long.parseLong(token.image));
          break;
        case 83:
          jj_consume_token(83);
                                              limit.setRowCountJdbcParameter(true);
          break;
        case K_ALL:
          jj_consume_token(K_ALL);
                                                  limit.setLimitAll(true);
          break;
        default:
          jj_la1[74] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case K_OFFSET:
          jj_consume_token(K_OFFSET);
          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
          case S_INTEGER:
            token = jj_consume_token(S_INTEGER);
                                                              limit.setOffset(Long.parseLong(token.image));
            break;
          case 83:
            jj_consume_token(83);
                                                                                                                      limit.setOffsetJdbcParameter(true);
            break;
          default:
            jj_la1[75] = jj_gen;
            jj_consume_token(-1);
            throw new ParseException();
View Full Code Here

Examples of org.apache.drill.common.logical.data.Limit

  }

  @Test
  public void limitStart() throws IOException {
    RecordIterator incoming = TestUtils.jsonToRecordIterator("test", input);
    LimitROP limitROP = buildROP(new Limit(0, 2));
    limitROP.setInput(incoming);

    int nRecords = TestUtils.getIteratorCount(limitROP.getOutput());
    assertEquals(2, nRecords);
  }
View Full Code Here

Examples of org.apache.drill.common.logical.data.Limit

  }

  @Test
  public void limitMiddle() throws IOException {
    RecordIterator incoming = TestUtils.jsonToRecordIterator("test", input);
    LimitROP limitROP = buildROP(new Limit(1, 2));
    limitROP.setInput(incoming);

    int nRecords = TestUtils.getIteratorCount(limitROP.getOutput());
    assertEquals(1, nRecords);
  }
View Full Code Here

Examples of org.apache.drill.common.logical.data.Limit

  }

  @Test
  public void limitEnd() throws IOException {
    RecordIterator incoming = TestUtils.jsonToRecordIterator("test", input);
    LimitROP limitROP = buildROP(new Limit(3, 10));
    limitROP.setInput(incoming);

    int nRecords = TestUtils.getIteratorCount(limitROP.getOutput());
    assertEquals(1, nRecords);
  }
View Full Code Here

Examples of org.apache.drill.common.logical.data.Limit

  }

  @Test
  public void limitZeroLength() throws IOException {
    RecordIterator incoming = TestUtils.jsonToRecordIterator("test", input);
    LimitROP limitROP = buildROP(new Limit(1, 1));
    limitROP.setInput(incoming);

    int nRecords = TestUtils.getIteratorCount(limitROP.getOutput());
    assertEquals(0, nRecords);
  }
View Full Code Here

Examples of org.apache.drill.exec.physical.config.Limit

    }

    @Override
    public PhysicalOperator visitLimit(org.apache.drill.common.logical.data.Limit limit, Object value) throws OptimizerException {
      PhysicalOperator input = limit.getInput().accept(this, value);
      return new SelectionVectorRemover(new Limit(input, limit.getFirst(), limit.getLast()));
    }
View Full Code Here

Examples of org.apache.ode.ql.tree.nodes.Limit

    }
   
    private Query createSelection(ASTStart node) {
        Collection<Object> childs = new ArrayList<Object>(node.jjtGetNumChildren());
        OrderBy orderBy = null;
        Limit limit = null;
        for(int index = 0;index < node.jjtGetNumChildren();index++) {
          Node childNode = node.jjtGetChild(index);
            if(childNode instanceof ASTOrderBy) {
              orderBy = createOrderBy(childNode);
            } else if(childNode instanceof ASTLimit) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.