-
Notifications
You must be signed in to change notification settings - Fork 688
Fix UNION/UNION ALL with HTML tables - incorrect validation logic #2313
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
|
@copilot continue |
Co-authored-by: mathiasrw <[email protected]>
Completed! Fixed the bug in src/84from.js by changing the validation logic from Changes in commit ef88e7e:
|
|
Run yarn test-format-all |
Co-authored-by: mathiasrw <[email protected]>
|
@copilot Run yarn test-format-all |
Co-authored-by: mathiasrw <[email protected]>
Fixes issue #485 where UNION and UNION ALL operations only returned data from the first HTML table, with empty rows from the second table.
Root Cause
The bug was in
src/84from.jsline 44, where the HTML table validation logic used&&(AND) instead of||(OR):The buggy logic failed to properly validate HTML table selectors because:
!selis true (selector found nothing),sel.tagNamewould be undefined or throw an errorThis caused the HTML table reader to fail silently during UNION operations, resulting in empty objects for rows from the second table.
Changes Made
src/84from.jsline 44 (changed&&to||)Testing
yarn test-format-allThe fix is minimal and surgical, changing only the validation logic to properly check HTML table elements in UNION operations.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.