Skip to content

[#740] SELECT query with IS NULL returns incorrect results in some cases

Narayanan Iyer requested to merge nars1/YDBOcto:octo740 into master
  • A new test_xref/TX07 bats subtest tests the 2 queries described at #740 (closed).

  • To help with the testing, a new XECUTE_M_CODE SQL function is introduced in a new file tests/fixtures/xecutemcode.sql. It uses an M function defined in tests/fixtures/xecutemcode.m to enable executing arbitrary M code while inside SQL. This is expected to be used in other tests too as it avoids us having to break out of Octo to run M code and get back in Octo. We can now just run a SELECT XECUTE_M_CODE("zwrite $zyrelease"); for example all the while staying in Octo.

    Note that this cannot be defined in tests/fixtures/octo-seed.sql as it can cause arbitrary M code to be run by rocto clients that do not have permissions to do so. So it is a test-only change.

  • I noticed that similar logic was already used by the test_group_by/TGB24 subtest where it defined its own version of the XECUTE_M_CODE function so removed such usage from the following files.

    • tests/fixtures/Q6F.m
    • tests/fixtures/TGB24.sql
    • tests/outref/TGB24.ref

    And modified tests/test_group_by.bats.in to instead load the new xecutemcode.sql fixture.

Edited by Narayanan Iyer

Merge request reports