You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the ROUND function in PyDough requires the user to explicitly provide a precision argument. However, Python's built-in round() function defaults to a precision of 0 when no precision is specified. To ensure consistency and make the ROUND function more user-friendly, its behavior should be updated to align with Python's round() by defaulting the precision to 0.
Proposed Solution:
Update the ROUND function implementation to make the precision argument optional.
If no precision is provided, default to 0.
Example:
Current Behavior:
ROUND(expression, 0) # Users must explicitly provide the precision, e.g., 0 for rounding to the nearest integer.
New Behavior:
ROUND(expression) # Defaults to ROUND(expression, 0)
Ensure that this change is reflected in the documentation.
The text was updated successfully, but these errors were encountered:
Description:
Currently, the
ROUND
function in PyDough requires the user to explicitly provide a precision argument. However, Python's built-inround()
function defaults to a precision of0
when no precision is specified. To ensure consistency and make theROUND
function more user-friendly, its behavior should be updated to align with Python'sround()
by defaulting the precision to0
.Proposed Solution:
ROUND
function implementation to make the precision argument optional.0
.Example:
Current Behavior:
New Behavior:
The text was updated successfully, but these errors were encountered: