
Consider the test case below. It is unexpected that the second query return an empty result, as the first query return `NULL`, and the subsequent queries with `ORDER BY` shouldn't affect the result set.

```sql
DROP TABLE t0;
DROP TABLE t1;

CREATE TABLE t0(c0 INT);
CREATE TABLE t1(c0 INT);
INSERT INTO t1 (c0) VALUES (1);

SELECT t0.c0 FROM t1 LEFT  JOIN t0 ON 1; -- NULL
SELECT t0.c0 FROM t1 LEFT  JOIN t0 ON 1 ORDER BY 1 DESC; 
-- Expected: NULL
-- Actual: empty result

```
I build docker image following this: https://github.com/openlink/vos-reference-docker.

Here's the version: Version 07.20.3238-pthreads for Linux as of Feb  7 2024 (604fdc7)



### 
Unexpected results when using `ORDER BY`  
This is a GitHub Issue
repo:virtuoso-opensource
owner:openlink
Title : Unexpected results when using `ORDER BY`  
Issue date:

--- start body ---

Consider the test case below. It is unexpected that the second query return an empty result, as the first query return `NULL`, and the subsequent queries with `ORDER BY` shouldn't affect the result set.

```sql
DROP TABLE t0;
DROP TABLE t1;

CREATE TABLE t0(c0 INT);
CREATE TABLE t1(c0 INT);
INSERT INTO t1 (c0) VALUES (1);

SELECT t0.c0 FROM t1 LEFT  JOIN t0 ON 1; -- NULL
SELECT t0.c0 FROM t1 LEFT  JOIN t0 ON 1 ORDER BY 1 DESC; 
-- Expected: NULL
-- Actual: empty result

```
I build docker image following this: https://github.com/openlink/vos-reference-docker.

Here's the version: Version 07.20.3238-pthreads for Linux as of Feb  7 2024 (604fdc7)



### 
--- end body ---

None