public static Object getValueAsObject(Row row) throws IOException {
    Object ans = 0;
    switch (row.getDataType(0)) {
      case INT32:
        ans = row.getInt(0);
        break;
      case INT64:
        ans = row.getLong(0);
        break;
      case FLOAT:
        ans = row.getFloat(0);
        break;
      case DOUBLE:
        ans = row.getDouble(0);
        break;
      case BOOLEAN:
        ans = row.getBoolean(0);
        break;
      case TEXT:
        ans = row.getString(0);
        break;
      case BLOB:
      case STRING:
      case DATE:
      case TIMESTAMP:
      default:
        break;
    }
    return ans;
  }
Get value from 0th column from Row, and cast to Object.

@param row data row
@return value from 0th column from Row
library-udf/src/main/java/org/apache/iotdb/library/util/Util.java