Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volatility::Volatile does not work for functions with arguments #13000

Closed
agscpp opened this issue Oct 18, 2024 · 1 comment · Fixed by #13001
Closed

Volatility::Volatile does not work for functions with arguments #13000

agscpp opened this issue Oct 18, 2024 · 1 comment · Fixed by #13001
Labels
bug Something isn't working

Comments

@agscpp
Copy link
Contributor

agscpp commented Oct 18, 2024

Describe the bug

For functions whose signature contains Volatility::Volatile and arguments, invoke is called once and without _number_rows

To Reproduce

**TABLE:**
"+-------+", //
"| value |", //
"+-------+", //
"| val_1 |", //
"| val_2 |", //
"| val_3 |", //
"| val_4 |", //
"| val_5 |", //
"| val_6 |", //
"| val_7 |", //
"+-------+",
SELECT random(1, 10) AS r, table.value AS value FROM table;

random(a, b) is a function that returns a random value in the range from a to b. This function has the following signature:
Signature::exact(vec![DataType::Int32, DataType::Int32], Volatility::Volatile)

Expected behavior

"+-----------+", //
"| r | value |", //
"+-----------+", //
"| 7 | val_1 |", //
"| 1 | val_2 |", //
"| 7 | val_3 |", //
"| 3 | val_4 |", //
"| 8 | val_5 |", //
"| 4 | val_6 |", //
"| 2 | val_7 |", //
"+-----------+",

Received behavior

"+-----------+", //
"| r | value |", //
"+-----------+", //
"| 7 | val_1 |", //
"| 7 | val_2 |", //
"| 7 | val_3 |", //
"| 7 | val_4 |", //
"| 7 | val_5 |", //
"| 7 | val_6 |", //
"| 7 | val_7 |", //
"+-----------+",
@agscpp
Copy link
Contributor Author

agscpp commented Oct 18, 2024

cc @alamb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant