Repository navigation
Fix error with ORDER BY in INTERSECT/EXCEPT queries - #2304
Conversation
Co-authored-by: mathiasrw <[email protected]>
|
@copilot Continue |
Co-authored-by: mathiasrw <[email protected]>
Completed! Added defensive checks to prevent undefined access to |
|
|
Run yarn test-format-all |
Co-authored-by: mathiasrw <[email protected]>
|
@copilot Continue |
|
@copilot Continue |
|
Run yarn test-format-all |
All files are properly formatted. Verified with |
|
Run yarn test-format-all |
Co-authored-by: mathiasrw <[email protected]>
Fixes the "Unable to get property 'modifier' of undefined or null reference" error that occurs when using ORDER BY with INTERSECT or EXCEPT operations.
Description
This PR addresses issue #635 where queries using ORDER BY at the end of INTERSECT or EXCEPT operations would fail with a null reference error. The problem occurred because the code attempted to access
.query.modifierproperties without first checking if the.queryproperty existed.Changes Made
src/38query.js
Added defensive checks before accessing
.query.modifierproperties onunionfn,unionallfn,exceptfn, andintersectfnto prevent null/undefined reference errors:query.unionallfn.queryquery.unionfn.queryquery.exceptfn.queryquery.intersectfn.querytest/test635-B.js
Added comprehensive test suite with 6 test cases covering:
Testing
Example
Fixes #635
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.