Examples of longVal()


Examples of org.apache.lucene.queries.function.FunctionValues.longVal()

          if (!fv.exists(doc)) {
            ++doc;
            continue;
          }
         
          long v = fv.longVal(doc);

          // TODO: if all ranges are non-overlapping, we
          // should instead do a bin-search up front
          // (really, a specialized case of the interval
          // tree)
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.longVal()

                  return false;
                }
                if (fastMatchBits != null && fastMatchBits.get(docID) == false) {
                  return false;
                }
                return accept(values.longVal(docID));
              }

              @Override
              public int length() {
                return maxDoc;
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.longVal()

          doc++;
          continue;
        }
        // Skip missing docs:
        if (fv.exists(doc)) {
          counter.add(fv.longVal(doc));
        } else {
          missingCount++;
        }
      }
    }
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.longVal()

    AtomicReaderContext leaf = reader.leaves().get(0);
    FunctionValues values = vs.getValues(new HashMap<String,Object>(), leaf);
   
    assertEquals(10, values.doubleVal(0), 0);
    assertEquals(10, values.floatVal(0), 0);
    assertEquals(10, values.longVal(0));
    assertEquals(10, values.intVal(0));
    assertEquals(10, values.shortVal(0));
    assertEquals(10, values.byteVal(0));
    assertEquals("10.0", values.strVal(0));
    assertEquals(new Double(10), values.objectVal(0));
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.longVal()

    assertEquals("10.0", values.strVal(0));
    assertEquals(new Double(10), values.objectVal(0));
   
    assertEquals(40, values.doubleVal(1), 0);
    assertEquals(40, values.floatVal(1), 0);
    assertEquals(40, values.longVal(1));
    assertEquals(40, values.intVal(1));
    assertEquals(40, values.shortVal(1));
    assertEquals(40, values.byteVal(1));
    assertEquals("40.0", values.strVal(1));
    assertEquals(new Double(40), values.objectVal(1));
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.longVal()

    assertEquals("40.0", values.strVal(1));
    assertEquals(new Double(40), values.objectVal(1));
   
    assertEquals(4, values.doubleVal(2), 0);
    assertEquals(4, values.floatVal(2), 0);
    assertEquals(4, values.longVal(2));
    assertEquals(4, values.intVal(2));
    assertEquals(4, values.shortVal(2));
    assertEquals(4, values.byteVal(2));
    assertEquals("4.0", values.strVal(2));
    assertEquals(new Double(4), values.objectVal(2));   
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.longVal()

        return ifVals.boolVal(doc) ? trueVals.intVal(doc) : falseVals.intVal(doc);
      }

      @Override
      public long longVal(int doc) {
        return ifVals.boolVal(doc) ? trueVals.longVal(doc) : falseVals.longVal(doc);
      }

      @Override
      public double doubleVal(int doc) {
        return ifVals.boolVal(doc) ? trueVals.doubleVal(doc) : falseVals.doubleVal(doc);
View Full Code Here

Examples of org.apache.lucene.queries.function.FunctionValues.longVal()

          vals[1] = y.intVal(doc);
        }
        @Override
        public void longVal(int doc, long[] vals) {
          vals[0] = x.longVal(doc);
          vals[1] = y.longVal(doc);
        }
        @Override
        public void floatVal(int doc, float[] vals) {
          vals[0] = x.floatVal(doc);
          vals[1] = y.floatVal(doc);
View Full Code Here

Examples of org.apache.pig.data.DataAtom.longVal()

        EvalFunc<DataAtom> count = new COUNT.Final();
        DataAtom output = new DataAtom();
        count.exec(tup, output);

        assertEquals("Expected count to be 100", 100, output.longVal());
    }

    @Test
    public void testSUM() throws Exception {
        int input[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
View Full Code Here

Examples of org.apache.pig.data.DataAtom.longVal()

                + "'using org.apache.pig.test.RangeSlicer()) all) generate COUNT($1);";
        pigServer.registerQuery(query);
        Iterator<Tuple> it = pigServer.openIterator("vals");
        Tuple cur = it.next();
        DataAtom val = cur.getAtomField(0);
        assertEquals(numvals, (int) val.longVal());
    }
}
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.