)]}'
{
  "commit": "63f51e692ebba328466f5952b4c30c628713712f",
  "tree": "79619f5f6a980cf10f965db78ff2bd3748784189",
  "parents": [
    "fcb293b74097d2ffe3ad6e769711740040a2e956"
  ],
  "author": {
    "name": "Nikolina Vraneš",
    "email": "nikolina.vranes@databricks.com",
    "time": "Mon Nov 30 16:27:27 2026 +0000"
  },
  "committer": {
    "name": "Wenchen Fan",
    "email": "wenchen@databricks.com",
    "time": "Mon Nov 30 16:27:27 2026 +0000"
  },
  "message": "[SPARK-62390][SQL][SS][TEST] Add streaming test coverage for BIN BY\n\n### What changes were proposed in this pull request?\n\nThis PR adds streaming tests for the BIN BY relation operator.\n\n`sql-tests/inputs/streaming/bin-by.sql` has three flows that read `STREAM(source)`:\n\n- A stateless BIN BY. The sink gets the same rows as the batch query, which the file also runs.\n- BIN BY, then `GROUP BY bin_start`, with a watermark on `ts_start`. `REFRESH FLOW` fails with `STREAMING_OUTPUT_MODE.UNSUPPORTED_OPERATION`, because `bin_start` does not carry the watermark.\n- BIN BY, then `GROUP BY ts_start, bin_start`, with a watermark on `ts_start`. The sink gets a group after a later row moves the watermark past the `ts_start` of that group.\n\n`UnsupportedOperationsSuite` gets a case that a `BinBy` node above a streaming relation passes `checkForStreaming`.\n\n### Why are the changes needed?\n\nBIN BY has batch tests only. The `SQLQueryTestSuite` class doc asks for a test under `sql-tests/inputs/streaming` for each new SQL syntax. These tests record how BIN BY behaves on a streaming input, including the aggregation that append mode rejects.\n\n### Does this PR introduce _any_ user-facing change?\n\nNo. This PR changes tests only.\n\n### How was this patch tested?\n\nGenerated the golden files with `SPARK_GENERATE_GOLDEN_FILES\u003d1 build/sbt \"sql/testOnly org.apache.spark.sql.StreamingSQLQueryTestSuite -- -z bin-by.sql\"`, then ran the same suite without the variable. Also ran it with `SPARK_ANSI_SQL_MODE\u003dfalse` and `SPARK_CODEGEN_COMPILER\u003djdk`. Ran `UnsupportedOperationsSuite`.\n\n### Was this patch authored or co-authored using generative AI tooling?\n\nGenerated-by: Isaac (Claude Fable 5.2)\n\nThis pull request and its description were written by Isaac.\n\nCloses #60911 from vranes/bin-by-streaming-tests.\n\nAuthored-by: Nikolina Vraneš \u003cnikolina.vranes@databricks.com\u003e\nSigned-off-by: Wenchen Fan \u003cwenchen@databricks.com\u003e\n\n\nskip-checks: true\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "cd19a293fe3e92574d09b295c561f254ad192db1",
      "old_mode": 33188,
      "old_path": "sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/UnsupportedOperationsSuite.scala",
      "new_id": "9b7a490938718fac2e3edd5591665350e61631eb",
      "new_mode": 33188,
      "new_path": "sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/UnsupportedOperationsSuite.scala"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0f3447f218f21aa1638073f06ffc21215a5866e3",
      "new_mode": 33188,
      "new_path": "sql/core/src/test/resources/sql-tests/analyzer-results/streaming/bin-by.sql.out"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d24edfd705983e22092ce89b69d27e5a38c4635f",
      "new_mode": 33188,
      "new_path": "sql/core/src/test/resources/sql-tests/inputs/streaming/bin-by.sql"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b71042797d65f55458bbc6de017169ccad8a79cd",
      "new_mode": 33188,
      "new_path": "sql/core/src/test/resources/sql-tests/results/streaming/bin-by.sql.out"
    }
  ]
}
