VictorMoni opened a new pull request, #69934:
URL: https://github.com/apache/doris/pull/69934

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Related PR: N/A
   
   Problem Summary:
   
   Running the complete editor script `; SELECT 1;; /* between */; SELECT 2; -- 
done` submits empty separators and standalone comments as separate Web SQL 
requests. The API requires exactly one statement per request, so an empty range 
can stop the script before a valid query, and a trailing comment can report a 
failure after successful queries.
   
   Reuse the existing scanner to track SQL outside comments and skip empty 
ranges in the complete-document execution queue. Preserve editor offsets, 
comments attached to SQL, and quoted comment markers. Keep unterminated block 
comments for server-side syntax validation. Explicit selections retain their 
existing behavior; the backend validator and supported scanner syntax are 
unchanged.
   
   Tests cover these cases and verify the Run button sends only the two real 
queries, or shows the existing warning for a comment-only script. Clear 
sessionStorage between page tests to isolate persisted editor history.
   
   ### Release note
   
   Fix SQL Playground script execution stopping on empty statements or 
reporting failures for standalone comments.
   
   ### Check List (For Author)
   
   - Test
       - [ ] Regression test
       - [x] Unit Test: `cd ui && npm test` — 31 files, 126 tests passed. 
Focused scanner/page suites: 22 tests passed. The new scanner cases and both 
page tests fail on the original scanner.
       - [x] Manual test: `npm run lint`, `npm run build` (includes TypeScript 
checking), and `git diff --check` passed.
       - [ ] No need to test or manual test.
   
   No live Doris cluster, FE/BE build, or Playwright end-to-end suite was run. 
Vitest emits jsdom pseudo-element getComputedStyle notices; the build emits its 
bundle-size warning.
   
   - Behavior changed:
       - [ ] No.
       - [x] Yes. Complete-document execution skips empty and 
standalone-comment ranges.
   
   - Does this need documentation?
       - [x] No. No new options or SQL syntax.
       - [ ] Yes.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to