### 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
/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0; you may not use this file except in compliance with the Elastic License
 * 2.0.
 */
package org.elasticsearch.xpack.sql.expression.function.scalar.math;
import org.elasticsearch.common.io.stream.Writeable.Reader;
import org.elasticsearch.test.AbstractWireSerializingTestCase;
import org.elasticsearch.xpack.sql.SqlIllegalArgumentException;
import org.elasticsearch.xpack.sql.expression.function.scalar.math.MathProcessor.MathOperation;
import java.io.IOException;
import java.math.BigInteger;
import java.util.Arrays;
public class MathFunctionProcessorTests extends AbstractWireSerializingTestCase<MathProcessor> {
    public static MathProcessor randomMathFunctionProcessor() {
        return new MathProcessor(randomFrom(MathOperation.values()));
    }
    @Override
    protected MathProcessor createTestInstance() {