### Elasticsearch Version

8.1.0-SNAPSHOT (but also affects 7.x releases)

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

OSX

### Problem Description

While the docs state that `RANDOM(null) = null` that's not always the case.

### Steps to Reproduce

```
GET _sql?format=txt
{
  "query": """
  SELECT random(n), n FROM longs
  """
}
```

yields 

```
    random(n)     |       n       
------------------+---------------
0.7308781907032909|1              
0.7311469360199058|2              
0.3860252809814635|null           
```

Expected would be `null` for the last row.

### Logs (if relevant)

_No response_
x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/expression/function/scalar/math/MathFunctionProcessorTests.java
return randomMathFunctionProcessor();
    }
    @Override
    protected Reader<MathProcessor> instanceReader() {
        return MathProcessor::new;
    }
    @Override
    protected MathProcessor mutateInstance(MathProcessor instance) throws IOException {
        return new MathProcessor(randomValueOtherThan(instance.processor(), () -> randomFrom(MathOperation.values())));
    }
    public void testApply() {
        MathProcessor proc = new MathProcessor(MathOperation.E);
        assertEquals(Math.E, proc.process(null));
        assertEquals(Math.E, proc.process(Math.PI));
        proc = new MathProcessor(MathOperation.SQRT);
        assertEquals(2.0, (double) proc.process(4), 0);
        assertEquals(3.0, (double) proc.process(9d), 0);
        assertEquals(1.77, (double) proc.process(3.14), 0.01);
    }
    public void testNumberCheck() {
        MathProcessor proc = new MathProcessor(MathOperation.E);
        SqlIllegalArgumentException siae = expectThrows(SqlIllegalArgumentException.class, () -> proc.process("string"));
        assertEquals("A number is required; received [string]", siae.getMessage());
    }
    public void testRandom() {
        MathProcessor proc = new MathProcessor(MathOperation.RANDOM);
        assertNotNull(proc.process(null));
        assertNotNull(proc.process(randomLong()));
    }
    public void testFloor() {