Consider the test case below. It is unexpected that the third query would return an empty result, as there's one row in the table that would make `SIGN(t0.c1)` evaluate to `1` (`true`). If the `PRIMARY KEY` constraint is removed, the third query returns the expected result.

```sql
DROP TABLE t0;

CREATE TABLE t0(c0 INT, c1 INT, PRIMARY KEY(c0));
INSERT INTO t0 (c0, c1) VALUES (1, 1);
INSERT INTO t0 (c0) VALUES (-1);

SELECT * FROM t0; -- -1 NULL, 1 1
SELECT SIGN(t0.c1) FROM t0; -- NULL, 1
SELECT * FROM t0 WHERE SIGN(t0.c1);
-- Expected: 1 1
-- Actual: Empty result set

-- also for FLOOR
SELECT * FROM t0; -- -1 NULL, 1 1
SELECT FLOOR(t0.c1) FROM t0; -- NULL, 1
SELECT * FROM t0 WHERE FLOOR(t0.c1);
-- Expected: 1 1
-- Actual: Empty result set
```

Here's the version I used.


```
>docker run -i -t pkleef/virtuoso-opensource-7 version

[pkleef/virtuoso-opensource-7:7.2.12-r17.2-g466615d-ubuntu]

This Docker image is using the following version of Virtuoso:

Virtuoso Open Source Edition (Column Store) (multi threaded)
Version 7.2.12-dev.3238-pthreads as of Jan 12 2024 (9df21ea5c)
Compiled for Linux (x86_64-ubuntu_bionic-linux-gnu)
Copyright (C) 1998-2024 OpenLink Software
```

Unexpected results when using math functions
This is a GitHub Issue
repo:virtuoso-opensource
owner:openlink
Title : Unexpected results when using math functions
Issue date:

--- start body ---
Consider the test case below. It is unexpected that the third query would return an empty result, as there's one row in the table that would make `SIGN(t0.c1)` evaluate to `1` (`true`). If the `PRIMARY KEY` constraint is removed, the third query returns the expected result.

```sql
DROP TABLE t0;

CREATE TABLE t0(c0 INT, c1 INT, PRIMARY KEY(c0));
INSERT INTO t0 (c0, c1) VALUES (1, 1);
INSERT INTO t0 (c0) VALUES (-1);

SELECT * FROM t0; -- -1 NULL, 1 1
SELECT SIGN(t0.c1) FROM t0; -- NULL, 1
SELECT * FROM t0 WHERE SIGN(t0.c1);
-- Expected: 1 1
-- Actual: Empty result set

-- also for FLOOR
SELECT * FROM t0; -- -1 NULL, 1 1
SELECT FLOOR(t0.c1) FROM t0; -- NULL, 1
SELECT * FROM t0 WHERE FLOOR(t0.c1);
-- Expected: 1 1
-- Actual: Empty result set
```

Here's the version I used.


```
>docker run -i -t pkleef/virtuoso-opensource-7 version

[pkleef/virtuoso-opensource-7:7.2.12-r17.2-g466615d-ubuntu]

This Docker image is using the following version of Virtuoso:

Virtuoso Open Source Edition (Column Store) (multi threaded)
Version 7.2.12-dev.3238-pthreads as of Jan 12 2024 (9df21ea5c)
Compiled for Linux (x86_64-ubuntu_bionic-linux-gnu)
Copyright (C) 1998-2024 OpenLink Software
```

--- end body ---
