@Override public void serverReduce(Object[] args, ExecutionContext ec) { DataType type = this.getReturnType(); Object o = args[0]; if (o != null) { count += (Long) type.convertFrom(o); } }
@Override public int getColumnType(int column) throws SQLException { column--; ColumnMeta c = this.columnMetas.get(column); DataType type = c.getDataType(); if (type == null) { throw new SQLException("data type is null, column is: " + c); } return type.getSqlType(); }