We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When truncating my timestamps to quarterly, the error: Unsupported truncate unit None was reported.
However, in the documentation quarterly is listed as supported: https://ibis-project.org/reference/expression-temporal.html#parameters-4. (Also, database backends support quarterly truncation).
The error appears to be the definition of 'unit_mapping' in the function visit_TimestampTruncate found at:
ibis/ibis/backends/sql/compilers/base.py
Line 837 in 038a95a
def visit_TimestampTruncate(self, op, *, arg, unit): unit_mapping = { "Y": "year", "M": "month", "W": "week", "D": "day", "h": "hour", "m": "minute", "s": "second", "ms": "ms", "us": "us", } if (unit := unit_mapping.get(unit.short)) is None: raise com.UnsupportedOperationError(f"Unsupported truncate unit {unit}")
There you can see that 'Q' is missing from the unit_mapping keys.
9.2.0
Postgres
https://github.com/ibis-project/ibis/blob/038a95a19d979fde23fee95df5df8c1838eaa9b3/ibis/backends/sql/compilers/base.py#L837
The text was updated successfully, but these errors were encountered:
I hit this recently too (DuckDB backend) but hadn't investigated, appreciate the thorough report!
Sorry, something went wrong.
Thanks! This looks like might have been a casualty of the port to sqlglot in 9.0, and that we may not have enough test coverage. Great bug report!
75b31c2
Nice. Appreciate the swift resolution. Will this be part of a new minor release soon?
We'll try to cut 9.3 this week!
cpcloud
Successfully merging a pull request may close this issue.
What happened?
When truncating my timestamps to quarterly, the error: Unsupported truncate unit None was reported.
However, in the documentation quarterly is listed as supported: https://ibis-project.org/reference/expression-temporal.html#parameters-4. (Also, database backends support quarterly truncation).
The error appears to be the definition of 'unit_mapping' in the function visit_TimestampTruncate found at:
ibis/ibis/backends/sql/compilers/base.py
Line 837 in 038a95a
There you can see that 'Q' is missing from the unit_mapping keys.
What version of ibis are you using?
9.2.0
What backend(s) are you using, if any?
Postgres
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: