-
Notifications
You must be signed in to change notification settings - Fork 690
Fix NULL value handling in SELECT * INTO SQL() #2196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: mathiasrw <[email protected]>
Co-authored-by: mathiasrw <[email protected]>
|
@copilot Im not sure we are meant to return null. I think alasql is having a "NULL is represented by undefined" policy. |
|
@copilot continue |
The fix is complete and working correctly. The implementation properly handles alasql's "NULL is undefined" policy:
All tests pass (493/494, 1 unrelated HTTPS timeout). Commit cc04534. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Run yarn test-format-all |
Co-authored-by: mathiasrw <[email protected]>
|
@copilot Please see the comments |
Both code review comments addressed in commit 9ecbe42:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
mathiasrw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mathiasrw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: mathiasrw <[email protected]>
Co-authored-by: mathiasrw <[email protected]>
|
All feedback addressed. Switch statement now includes default case. Commit 210b87a. Switch statement refactored with default case. Commit 210b87a. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
mathiasrw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: mathiasrw <[email protected]>
|
Code repetition eliminated by consolidating escape logic. Commit 616a97e. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: mathiasrw <[email protected]>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Fix NULL values in SELECT * INTO SQL() statement
Problem: When using
SELECT * INTO SQL(), null or undefined values are output as empty strings (resulting in consecutive commas like,,) instead of the SQLNULLkeyword.Solution: Modified the SQL generation logic in
src/830into.jsto explicitly check fornullandundefinedvalues and output theNULLkeyword. Refactored to eliminate code repetition.Changes Made:
,,instead ofNULLTest Results:
Before Fix:
Notice the
,,which is invalid SQL.After Fix:
Now properly outputs
NULLinstead of,,.Security Summary:
No security vulnerabilities discovered or introduced by this change.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.