{"record":{"id":"52cbbc652d908987","repo":"apache/beam","slug":"s-s-input-is-expected-to-be-empty-52cbbc","errorCode":null,"errorMessage":"%s %s input is expected to be empty","messagePattern":"(.+?) (.+?) input is expected to be empty","errorType":"validation","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/singlestore/src/main/java/org/apache/beam/sdk/io/singlestore/schematransform/SingleStoreSchemaTransformReadProvider.java","lineNumber":92,"sourceCode":"  public List<String> outputCollectionNames() {\n    return Collections.singletonList(OUTPUT_TAG);\n  }\n\n  /**\n   * An implementation of {@link SchemaTransform} for SingleStoreDB read jobs configured using\n   * {@link SingleStoreSchemaTransformReadConfiguration}.\n   */\n  private static class SingleStoreReadSchemaTransform extends SchemaTransform {\n    private final SingleStoreSchemaTransformReadConfiguration configuration;\n\n    SingleStoreReadSchemaTransform(SingleStoreSchemaTransformReadConfiguration configuration) {\n      this.configuration = configuration;\n    }\n\n    @Override\n    public PCollectionRowTuple expand(PCollectionRowTuple input) {\n      if (!input.getAll().isEmpty()) {\n        throw new IllegalArgumentException(\n            String.format(\n                \"%s %s input is expected to be empty\",\n                input.getClass().getSimpleName(), getClass().getSimpleName()));\n      }\n      SingleStoreIO.DataSourceConfiguration dataSourceConfiguration =\n          configuration.getDataSourceConfiguration();\n      String table = configuration.getTable();\n      String query = configuration.getQuery();\n      Boolean outputParallelization = configuration.getOutputParallelization();\n      Boolean withPartitions = configuration.getWithPartitions();\n\n      Preconditions.checkArgument(\n          !(outputParallelization != null && withPartitions != null && withPartitions),\n          \"outputParallelization parameter is not supported for partitioned read\");\n\n      if (withPartitions != null && withPartitions) {\n        SingleStoreIO.ReadWithPartitions<Row> readWithPartitions =\n            SingleStoreIO.readWithPartitionsRows();","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/singlestore/src/main/java/org/apache/beam/sdk/io/singlestore/schematransform/SingleStoreSchemaTransformReadProvider.java#L74-L110","documentation":"SingleStoreSchemaTransformReadProvider is a source transform: it takes no input PCollection. Its expand() throws IllegalArgumentException when the incoming PCollectionRowTuple contains any input, because a read provider must be a pipeline root.","triggerScenarios":"Applying the SingleStore read schema transform to a non-empty PCollectionRowTuple, e.g. composing it downstream of another transform or passing an accidentally named/extra tag in the input map.","commonSituations":"Chaining the read transform after a PBegin-to-PCollection conversion; YAML pipeline DSL wiring an input into the read transform; reusing a write-config object for a read transform.","solutions":["Apply the read schema transform with no inputs (empty PCollectionRowTuple / as a root of the pipeline).","Remove any accidental input tags from the tuple passed to expand.","If you want to enrich existing data with SingleStore data, read first, then join the resulting PCollections."],"exampleFix":"// before\nPCollectionRowTuple.of(\"input\", existingPc).apply(singleStoreReadTransform)\n\n// after\nPCollectionRowTuple.empty(pipeline).apply(singleStoreReadTransform)","handlingStrategy":"validation","validationCode":"if (!inputTuple.getAll().isEmpty()) {\n  throw new IllegalStateException(\"SingleStore read transform must be a pipeline root (no inputs)\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Apply read schema transforms directly on the pipeline/PCollectionRowTuple.empty(pipeline).","Never wire upstream PCollections into a read provider.","Do joins after reading, not into the reader."],"tags":["beam","schema-transform","singlestore","pipeline-topology"],"backgroundTag":"incompatible-source-type","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}