Examples of TColumnValue


Examples of org.apache.hive.service.cli.thrift.TColumnValue

    }
    if (columnIndex > colVals.size()) {
      throw new SQLException("Invalid columnIndex: " + columnIndex);
    }

    TColumnValue tColumnValue = colVals.get(columnIndex - 1);
    Type columnType = getSchema().getColumnDescriptorAt(columnIndex - 1).getType();

    switch (columnType) {
    case BOOLEAN_TYPE:
      return getBooleanValue(tColumnValue.getBoolVal());
    case TINYINT_TYPE:
      return getByteValue(tColumnValue.getByteVal());
    case SMALLINT_TYPE:
      return getShortValue(tColumnValue.getI16Val());
    case INT_TYPE:
      return getIntegerValue(tColumnValue.getI32Val());
    case BIGINT_TYPE:
      return getLongValue(tColumnValue.getI64Val());
    case FLOAT_TYPE:
      return getDoubleValue(tColumnValue.getDoubleVal());
    case DOUBLE_TYPE:
      return getDoubleValue(tColumnValue.getDoubleVal());
    case STRING_TYPE:
      return getStringValue(tColumnValue.getStringVal());
    case VARCHAR_TYPE:
      return getStringValue(tColumnValue.getStringVal());
    case BINARY_TYPE:
      return getBinaryValue(tColumnValue.getStringVal());
    case DATE_TYPE:
      return getDateValue(tColumnValue.getStringVal());
    case TIMESTAMP_TYPE:
      return getTimestampValue(tColumnValue.getStringVal());
    case DECIMAL_TYPE:
      return getBigDecimalValue(tColumnValue.getStringVal());
    case NULL_TYPE:
      wasNull = true;
      return null;
    default:
      throw new SQLException("Unrecognized column type:" + columnType);
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.