/** * For Calcite 1.5, we made the mistake of using array length to determine when the value for a * column is a scalar or an array. This method performs the old parsing for backwards * compatibility. * * @param column The protobuf ColumnValue object * @return The parsed value for this column */ static Object parseOldStyleColumn(Common.ColumnValue column) { if (column.getValueCount() > 1) { List<Object> array = new ArrayList<>(column.getValueCount()); for (Common.TypedValue columnValue : column.getValueList()) { array.add(getScalarValue(columnValue)); } return array; } else { return getScalarValue(column.getValue(0)); } }
/** * For Calcite 1.5, we made the mistake of using array length to determine when the value for a * column is a scalar or an array. This method performs the old parsing for backwards * compatibility. * * @param column The protobuf ColumnValue object * @return The parsed value for this column */ static Object parseOldStyleColumn(Common.ColumnValue column) { if (column.getValueCount() > 1) { List<Object> array = new ArrayList<>(column.getValueCount()); for (Common.TypedValue columnValue : column.getValueList()) { array.add(deserializeScalarValue(columnValue)); } return array; } else { return deserializeScalarValue(column.getValue(0)); } }
/** * For Calcite 1.5, we made the mistake of using array length to determine when the value for a * column is a scalar or an array. This method performs the old parsing for backwards * compatibility. * * @param column The protobuf ColumnValue object * @return The parsed value for this column */ static Object parseOldStyleColumn(Common.ColumnValue column) { if (column.getValueCount() > 1) { List<Object> array = new ArrayList<>(column.getValueCount()); for (Common.TypedValue columnValue : column.getValueList()) { array.add(deserializeScalarValue(columnValue)); } return array; } else { return deserializeScalarValue(column.getValue(0)); } }