This is an automated email from the ASF dual-hosted git repository.

cloud-fan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 3dc410f915ca [MINOR][SQL] Add streaming SQL test coverage guidance
3dc410f915ca is described below

commit 3dc410f915cad2ae6a08a4b06828419a846d2a86
Author: Siying Dong <[email protected]>
AuthorDate: Tue Nov 3 06:34:59 2026 +0000

    [MINOR][SQL] Add streaming SQL test coverage guidance
    
    ### What changes were proposed in this pull request?
    
    Document the expected streaming test coverage for new SQL syntax and 
user-visible SQL features.
    The root agent instructions direct contributors to the SQL query test suite 
documentation, which
    now asks for a streaming test that either verifies supported behavior or 
the expected unsupported
    error when the feature can apply to streaming queries.
    
    ### Why are the changes needed?
    
    New SQL syntax can unintentionally omit Structured Streaming coverage. 
Recording this expectation
    next to the SQL golden test documentation makes it more likely that 
contributors and coding agents
    consider streaming behavior when adding SQL features.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Documentation-only change. Ran `git diff --check` and checked changed Scala 
lines for the
    100-character limit.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    Generated-by: OpenAI Codex (GPT-5)
    
    Closes #60033 from siying/codex/sql-streaming-test-instructions.
    
    Authored-by: Siying Dong <[email protected]>
    Signed-off-by: Wenchen Fan <[email protected]>
---
 AGENTS.md                                                           | 3 +++
 .../src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala     | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/AGENTS.md b/AGENTS.md
index 499b57ffcd42..5ac259ab7a30 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -16,6 +16,9 @@ Before the first code edit or running test in a session, 
ensure a clean working
 
 SQL golden file tests are managed by `SQLQueryTestSuite` and its variants. 
Read the class documentation before running or updating these tests. DO NOT 
edit the generated golden files (`.sql.out`) directly. Always regenerate them 
when needed, and carefully review the diff to make sure it's expected.
 
+When adding new SQL syntax or a user-visible SQL feature, follow the streaming 
test coverage
+guidance in the `SQLQueryTestSuite` class documentation.
+
 Spark Connect protocol is defined in proto files under 
`sql/connect/common/src/main/protobuf/`. Read the README there before modifying 
proto definitions.
 
 When adding a member to an existing class or object, follow the sectioning the 
file already uses and put the new member with the code it belongs with. The 
common failure mode is dropping it wherever it is first used without checking 
how the file is organized, splitting a section of unrelated code in the 
process. Beyond grouping related code there is no prescribed order -- the 
Databricks Scala guide, which Spark follows, asks only that a long class group 
its members into logical sections  [...]
diff --git 
a/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala 
b/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
index 9d193a591372..a4a8554693e8 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
@@ -44,6 +44,12 @@ import org.apache.spark.util.Utils
  * Each case is loaded from a file in 
"spark/sql/core/src/test/resources/sql-tests/inputs".
  * Each case has a golden result file in 
"spark/sql/core/src/test/resources/sql-tests/results".
  *
+ * When adding new SQL syntax or a user-visible SQL feature, consider its 
behavior with streaming
+ * input. Unless the syntax or feature clearly cannot apply to streaming 
queries, add a test under
+ * "spark/sql/core/src/test/resources/sql-tests/inputs/streaming". The test 
should either verify
+ * that the feature works correctly with streaming input or verify the 
expected error when streaming
+ * use is unsupported.
+ *
  * To run the entire test suite:
  * {{{
  *   build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to