betodealmeida commented on issue #36113:
URL: https://github.com/apache/superset/issues/36113#issuecomment-4744529405
This should now work with newer versions of `sqlglot`:
```python
>>> import sqlglot
>>> sqlglot.__version__
'27.15.2'
>>> from sqlglot.dialects.dialect import Dialects
>>> import sqlglot
>>> sqlglot.parse_one("ROUND(AVG(x), n)",
Dialects.REDSHIFT).sql(Dialects.REDSHIFT)
'ROUND(CAST(AVG(x) AS DECIMAL), n)'
>>>
```
```python
>>> import sqlglot
>>> sqlglot.__version__
'30.8.0'
>>> from sqlglot.dialects.dialect import Dialects
>>> import sqlglot
>>> sqlglot.parse_one("ROUND(AVG(x), n)",
Dialects.REDSHIFT).sql(Dialects.REDSHIFT)
'ROUND(AVG(x), n)'
>>>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]