{"record":{"id":"a8d75c6b5d2058e3","repo":"apache/beam","slug":"null-column-list-at-family","errorCode":null,"errorMessage":"Null column list at family ","messagePattern":"Null column list at family ","errorType":"exception","errorClass":"NullPointerException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableRowToBeamRowFlat.java","lineNumber":94,"sourceCode":"      super(schema);\n      this.columnsMapping = columnsMapping;\n    }\n\n    @Override\n    public Row apply(com.google.bigtable.v2.Row bigtableRow) {\n      Row.FieldValueBuilder rowBuilder =\n          Row.withSchema(schema).withFieldValue(KEY, bigtableRow.getKey().toStringUtf8());\n\n      bigtableRow.getFamiliesList().stream()\n          .filter(family -> columnsMapping.containsKey(family.getName()))\n          .forEach(family -> setFamily(rowBuilder, family));\n      return rowBuilder.build();\n    }\n\n    private void setFamily(Row.FieldValueBuilder rowBuilder, Family family) {\n      Set<String> columns = columnsMapping.get(family.getName());\n      if (columns == null) {\n        throw new NullPointerException(\"Null column list at family \" + family.getName());\n      } else {\n        family.getColumnsList().stream()\n            .filter(column -> columns.contains(column.getQualifier().toStringUtf8()))\n            .forEach(column -> setColumn(rowBuilder, column));\n      }\n    }\n\n    private void setColumn(Row.FieldValueBuilder rowBuilder, Column column) {\n      String columnName = column.getQualifier().toStringUtf8();\n      Schema.FieldType type = schema.getField(columnName).getType();\n      rowBuilder.withFieldValue(columnName, getCellValue(getLastCell(column.getCellsList()), type));\n    }\n  }\n}\n","sourceCodeStart":76,"sourceCodeEnd":109,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableRowToBeamRowFlat.java#L76-L109","documentation":"In BigtableRowToBeamRowFlat.setFamily, the columnsMapping maps family names to the set of column qualifiers to include. If a family encountered in the Bigtable row has no entry in columnsMapping, a NullPointerException('Null column list at family <name>') is thrown. This is an internal invariant: every family in the row must have been pre-registered in the flat mapping.","triggerScenarios":"A Bigtable row contains a family not present in the schema/column mapping used to build columnsMapping — e.g. new families added to the table after the mapping was generated, or case/name mismatches between family names and mapping keys.","commonSituations":"Table schema evolved (family added) while the Beam pipeline's mapping was built from an older table schema; read filtered by family but the flat converter receives unfiltered rows; typo in family name in the mapping.","solutions":["Regenerate the schema/column mapping so it includes all families present in the table (or restrict the read to the mapped families)","Filter the read to only the mapped families (e.g. use RowFilters on family names) so unmapped families never reach the converter","Check family-name casing/spelling differences between the table and the mapping","Guard at the apply level: skip families missing from columnsMapping instead of assuming all families are mapped"],"exampleFix":"// before\nSet<String> columns = columnsMapping.get(family.getName());\nif (columns == null) { throw ... }\n// after\nSet<String> columns = columnsMapping.get(family.getName());\nif (columns == null) { return; } // ignore unmapped families","handlingStrategy":"type-guard","validationCode":"for (String family : tableFamilies) {\n  if (!columnsMapping.containsKey(family)) {\n    throw new IllegalArgumentException(\"Family \" + family + \" missing from columnsMapping; regenerate mapping\");\n  }\n}","typeGuard":"boolean isMappedFamily(Map<String, Set<String>> mapping, Family family) {\n  return mapping.containsKey(family.getName());\n}","tryCatchPattern":null,"preventionTips":["Regenerate the column mapping whenever the table's family set changes","Restrict reads to mapped families with RowFilters so unmapped families never appear","Compare family names case-sensitively when building the mapping"],"tags":["java","bigtable","schema","null","schema-evolution"],"backgroundTag":"schema-validation-failed","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}