{"record":{"id":"2768c6a765d903bc","repo":"apache/beam","slug":"required-field-timestamp-transform-not-set-in-s","errorCode":null,"errorMessage":"Required field 'timestamp_transform' not set in %s","messagePattern":"Required field 'timestamp_transform' not set in (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/TriggerTranslation.java","lineNumber":255,"sourceCode":"          return AfterWatermark.pastEndOfWindow()\n              .withLateFirings((OnceTrigger) fromProto(eowProto.getLateFirings()));\n        }\n      case AFTER_PROCESSING_TIME:\n        AfterProcessingTime trigger = AfterProcessingTime.pastFirstElementInPane();\n        for (RunnerApi.TimestampTransform transform :\n            triggerProto.getAfterProcessingTime().getTimestampTransformsList()) {\n          switch (transform.getTimestampTransformCase()) {\n            case ALIGN_TO:\n              trigger =\n                  trigger.alignedTo(\n                      Duration.millis(transform.getAlignTo().getPeriod()),\n                      new Instant(transform.getAlignTo().getOffset()));\n              break;\n            case DELAY:\n              trigger = trigger.plusDelayOf(Duration.millis(transform.getDelay().getDelayMillis()));\n              break;\n            case TIMESTAMPTRANSFORM_NOT_SET:\n              throw new IllegalArgumentException(\n                  String.format(\"Required field 'timestamp_transform' not set in %s\", transform));\n            default:\n              throw new IllegalArgumentException(\n                  String.format(\n                      \"Unknown timestamp transform case: %s\",\n                      transform.getTimestampTransformCase()));\n          }\n        }\n        return trigger;\n      case AFTER_SYNCHRONIZED_PROCESSING_TIME:\n        return AfterSynchronizedProcessingTime.ofFirstElement();\n      case ALWAYS:\n        return new ReshuffleTrigger();\n      case ELEMENT_COUNT:\n        return AfterPane.elementCountAtLeast(triggerProto.getElementCount().getElementCount());\n      case NEVER:\n        return Never.ever();\n      case OR_FINALLY:","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/TriggerTranslation.java#L237-L273","documentation":"TriggerTranslation.fromProto converts a RunnerApi.TimestampTransform proto into Java triggers. If the oneof timestamp_transform was never set (case TIMESTAMPTRANSFORM_NOT_SET), there is no transform to translate, so an IllegalArgumentException is thrown.","triggerScenarios":"Deserializing a pipeline proto where a TimestampTransform message exists but no variant (truncate/delay/alignTo) was populated.","commonSituations":"Protos built programmatically without calling the setter; serialization dropping unset oneof fields; hand-crafted or corrupted pipeline files.","solutions":["Set one of the timestamp_transform variants when building the proto (setDelay, setAlignTo, or setTruncate)","Regenerate the pipeline proto from valid trigger construction code","Validate the proto's TimestampTransformCase before calling fromProto"],"exampleFix":"// before\nTimestampTransform.newBuilder().build();\n// after\nTimestampTransform.newBuilder()\n    .setDelay(TimestampTransform.Delay.newBuilder().setDelayMillis(1000))\n    .build();","handlingStrategy":"type-guard","validationCode":"if (transform.getTimestampTransformCase() == TimestampTransform.TimestampTransformCase.TIMESTAMPTRANSFORM_NOT_SET) {\n  throw new IllegalStateException(\"timestamp_transform must be set\");\n}","typeGuard":"boolean hasTimestampTransform(TimestampTransform t) {\n  return t.getTimestampTransformCase() != TimestampTransformCase.TIMESTAMPTRANSFORM_NOT_SET;\n}","tryCatchPattern":"try {\n  TriggerTranslation.fromProto(triggerProto);\n} catch (IllegalArgumentException e) {\n  // handle unset timestamp_transform oneof\n}","preventionTips":["Always set a variant when constructing TimestampTransform protos","Validate generated pipeline protos before staging them"],"tags":["java","beam","triggers","protobuf"],"backgroundTag":"missing-required-argument","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"}