15 package com.cloudera.impala.util;
17 import com.cloudera.impala.thrift.TColumnValue;
27 if (val.isSetByte_val()) {
28 return (
double) val.byte_val;
29 }
else if (val.isSetShort_val()) {
30 return (
double) val.short_val;
31 }
else if (val.isSetInt_val()) {
32 return (
double) val.int_val;
33 }
else if (val.isSetLong_val()) {
34 return (
double) val.long_val;
35 }
else if (val.isSetDouble_val()) {
36 return (
double) val.double_val;
37 }
else if (val.isSetString_val()) {
41 return Double.valueOf(val.string_val);
42 }
catch (NumberFormatException e) {
static double getNumericVal(TColumnValue val)