Package com.alibaba.wasp

Examples of com.alibaba.wasp.DataType


      String tableName =  StorageTableNameBuilder.buildEntityTableName(plan.getTableDesc().getTableName());

      AggregateType type = info.getAggregateType();

      byte[] value = null;
      DataType resultDataType = DataType.STRING;

      try {
        switch (type) {
          case COUNT: {
            long count = aggregationClient.count(Bytes.toBytes(tableName),
View Full Code Here


      throw new UnsupportedException("Input is not int or long, it is " + expr);
    }
  }

  public void checkType(Field field, SQLExpr value) throws UnsupportedException {
    DataType type = field.getType();
    if (type == DataType.INT32 || type == DataType.INT64) {
      if (value instanceof SQLIntegerExpr) {
        return; // OK
      }
    } else if (type == DataType.DOUBLE || type == DataType.FLOAT) {
View Full Code Here

      return value;
    }
  }

  private byte[] parseValueIfNegative(byte[] value, Field field) {
    DataType type = field.getType();
    if (type == DataType.INT32) {
      int val = Bytes.toInt(value);
      return addBytesPrefix(value, val < 0);
    } else if (type == DataType.INT64) {
      long val = Bytes.toLong(value);
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.DataType

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.