/** * Calculate the row size from the given schema. * * @param schema input schema * @return estimated row size in bytes */ public static int estimateRowByteSizeWithSchema(Schema schema) { int size = 0; for (Column column : schema.fields) { size += getColByteSize(column); } return size; }
/** * Calculate the row size from the given schema. * * @param schema input schema * @return estimated row size in bytes */ public static int estimateRowByteSizeWithSchema(Schema schema) { int size = 0; for (Column column : schema.getAllColumns()) { size += getColByteSize(column); } return size; }