lovasoa opened a new issue, #1634:
URL: https://github.com/apache/datafusion-sqlparser-rs/issues/1634
In the current sqlparser, parsing
```sql
select
a,
b
from
t
```
and then fromatting it back to a string results in
```sql
select a,b from t
```
Since sqlparser v0.53, we have the source location information inside the
AST, which theoretically makes it possible to reconstruct the original query
formatting (or at least getting very close to it).
I know this is a huge undertaking, but it would be really useful. For
instance, in [sqlpage](https://github.com/lovasoa/SQLpage), I would love being
able to respect the initial user formatting of queries, in order for database
errors that contain source position information to be meaningful and not
confusing.
I'm opening this issue to start discussing this with the community (and
especially with you @iffyio and @alamb :wink: ).
Am I the only one interested in this ? What would be the best approach to
implementing this ?
--
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]