{"record":{"id":"7230a7fe66984c99","repo":"apache/iceberg","slug":"fallback-to-use-none-distribution-mode-beca-7230a7","errorCode":null,"errorMessage":"{}: Fallback to use 'none' distribution mode, because there are no equality fields set and {}='range' is not supported yet in flink","messagePattern":"(.+?): Fallback to use 'none' distribution mode, because there are no equality fields set and (.+?)='range' is not supported yet in flink","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/HashKeyGenerator.java","lineNumber":177,"sourceCode":"              Types.NestedField sourceField = schema.findField(partitionField.sourceId());\n              Preconditions.checkState(\n                  sourceField != null && equalityFields.contains(sourceField.name()),\n                  \"%s: In 'hash' distribution mode with equality fields set, partition field '%s' \"\n                      + \"should be included in equality fields: '%s'\",\n                  tableName,\n                  partitionField,\n                  schema.columns().stream()\n                      .filter(c -> equalityFields.contains(c.name()))\n                      .collect(Collectors.toList()));\n            }\n            return partitionKeySelector(\n                tableName, schema, spec, writeParallelism, maxWriteParallelism);\n          }\n        }\n\n      case RANGE:\n        if (equalityFields.isEmpty()) {\n          LOG.warn(\n              \"{}: Fallback to use 'none' distribution mode, because there are no equality fields set \"\n                  + \"and {}='range' is not supported yet in flink\",\n              tableName,\n              WRITE_DISTRIBUTION_MODE);\n          return tableKeySelector(tableName, writeParallelism, maxWriteParallelism);\n        } else {\n          LOG.info(\n              \"{}: Distribute rows by equality fields, because there are equality fields set \"\n                  + \"and {}='range' is not supported yet in flink\",\n              tableName,\n              WRITE_DISTRIBUTION_MODE);\n          return equalityFieldKeySelector(\n              tableName, schema, equalityFields, writeParallelism, maxWriteParallelism);\n        }\n\n      default:\n        throw new IllegalArgumentException(\n            tableName + \": Unrecognized \" + WRITE_DISTRIBUTION_MODE + \": \" + mode);","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/HashKeyGenerator.java#L159-L195","documentation":"The dynamic sink's HashKeyGenerator does not support RANGE distribution in Flink. When a table requests RANGE with no equality fields, it warns and falls back to a table-level key selector ('none'-like behavior per table).","triggerScenarios":"A DynamicRecord for a table whose write.distribution-mode is RANGE, with empty equality fields, reaching HashKeyGenerator.getKeySelector.","commonSituations":"Tables configured for batch/range distribution in Spark also being written by the Flink dynamic sink; default table properties set range mode.","solutions":["Set write.distribution-mode to 'hash' or 'none' on tables written by the Flink dynamic sink.","Provide equality fields if hash-keyed distribution is needed alongside keyed semantics.","Ignore the warning if per-table serialization is acceptable for this workload."],"exampleFix":"// before\ntable.updateProperties().set(\"write.distribution-mode\", \"range\").commit();\n// after\ntable.updateProperties().set(\"write.distribution-mode\", \"none\").commit();","handlingStrategy":"fallback","validationCode":"if (\"range\".equals(table.properties().get(\"write.distribution-mode\"))) {\n  LOG.warn(\"Range distribution unsupported in Flink dynamic sink; falling back to per-table keying\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer hash/none distribution on tables written by the Flink dynamic sink.","Keep engine-specific distribution configs out of shared table properties when possible."],"tags":["flink","dynamic-sink","distribution-mode","unsupported"],"backgroundTag":"unsupported-config-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}