Examples of NumericType


Examples of mondrian.olap.type.NumericType

    public String getName() {
        return "Val";
    }

    public Type[] getParameterTypes() {
        return new Type[] { new NumericType() };
    }
View Full Code Here

Examples of mondrian.olap.type.NumericType

    public String[] getReservedWords() {
        return null;
    }

    public Type getReturnType(Type[] parameterTypes) {
        return new NumericType();
    }
View Full Code Here

Examples of mondrian.olap.type.NumericType

    public Syntax getSyntax() {
        return Syntax.Function;
    }

    public Type getReturnType(Type[] parameterTypes) {
        return new NumericType();
    }
View Full Code Here

Examples of org.apache.drill.exec.ref.values.NumericValue.NumericType

      for(int i =0; i < args.length; i++){
        final DataValue v = args[i].eval();
//        logger.debug("DataValue {}", v);
        if(Types.isNumericType(v.getDataType())){
          NumericValue n = v.getAsNumeric();
          NumericType nt = n.getNumericType();
//          logger.debug("Numeric Type: {}", nt);
          if(isFloating || nt == NumericType.FLOAT || nt == NumericType.DOUBLE){
            if(!isFloating){
              d = l;
              isFloating = true;
View Full Code Here

Examples of org.apache.lucene.document.FieldType.NumericType

    for(int id=0;id<numDocs;id++) {
      Document doc = new Document();
      final Field nf;
      final Field sf;
      final Number answer;
      final NumericType typeAnswer;
      if (random().nextBoolean()) {
        // float/double
        if (random().nextBoolean()) {
          final float f = random().nextFloat();
          answer = Float.valueOf(f);
View Full Code Here

Examples of org.apache.lucene.document.FieldType.NumericType

      flags.append(dvToString(info.getNormType()));
    }
    else flags.append("----");
    if (numeric != null) {
      flags.append("#");
      NumericType nt = t.numericType();
      if (nt != null) {
        flags.append(nt.toString().charAt(0));
        int prec = t.numericPrecisionStep();
        String p = Integer.toHexString(prec);
        if (p.length() == 1) {
          p = "0" + p;
        }
View Full Code Here

Examples of org.apache.lucene.document.FieldType.NumericType

    else {
      upperNumber = null;
    }

    final NumericAnalyzer numericAnalyzer = numericRangeNode.getNumericAnalyzer();
    final NumericType numberType = numericRangeNode.getNumericType();
    final String field = numericRangeNode.getField().toString();
    final boolean minInclusive = numericRangeNode.isLowerInclusive();
    final boolean maxInclusive = numericRangeNode.isUpperInclusive();
    final int precisionStep = numericAnalyzer.getPrecisionStep();
View Full Code Here

Examples of org.apache.lucene.document.FieldType.NumericType

  public TokenStream tokenStream(Analyzer analyzer) throws IOException {
    if (!fieldType().indexed()) {
      return null;
    }

    final NumericType numericType = fieldType().numericType();
    if (numericType != null) {
      if (!(internalTokenStream instanceof NumericTokenStream)) {
        // lazy init the TokenStream as it is heavy to instantiate
        // (attributes,...) if not needed (stored field loading)
        internalTokenStream = new NumericTokenStream(type.numericPrecisionStep());
View Full Code Here

Examples of org.apache.lucene.document.FieldType.NumericType

  private void buildDocument(Document document, Serializer serializer) {
    final List<IndexableField> docFields = document.getFields();
    serializer.fields( docFields );
    for ( IndexableField fieldable : docFields ) {
      final FieldType fieldType = (FieldType) fieldable.fieldType();
      final NumericType numericType = fieldType.numericType();
      if ( numericType != null ) {
        LuceneNumericFieldContext context = new LuceneNumericFieldContext( fieldType, fieldable.name(), fieldable.boost() );
        switch ( numericType ) {
          case INT:
            serializer.addIntNumericField( fieldable.numericValue().intValue(), context );
            break;
          case LONG:
            serializer.addLongNumericField( fieldable.numericValue().longValue(), context );
            break;
          case FLOAT:
            serializer.addFloatNumericField( fieldable.numericValue().floatValue(), context );
            break;
          case DOUBLE:
            serializer.addDoubleNumericField( fieldable.numericValue().doubleValue(), context );
            break;
          default:
            String dataType = numericType.toString();
            throw log.unknownNumericFieldType( dataType );
        }
      }
      else if (fieldable instanceof Field) {
        Field safeField = (Field) fieldable;
View Full Code Here

Examples of org.apache.lucene.document.FieldType.NumericType

    for(int id=0;id<numDocs;id++) {
      Document doc = new Document();
      final Field nf;
      final Field sf;
      final Number answer;
      final NumericType typeAnswer;
      if (random().nextBoolean()) {
        // float/double
        if (random().nextBoolean()) {
          final float f = random().nextFloat();
          answer = Float.valueOf(f);
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.