[Postgres]: Structure of `orderby` AST does not match MySQL
Sorry for all the issues - having some trouble migrating to v5 as a lot of our Postgres tests are failing.
Parsing this query for MySQL and Postgres gives a different results structure. These were equivalent pre-v5 and both looked like the MySQL structure. This would be improved if the OrderBy type was not any:
SELECT col1 FROM tablename WHERE col1 = 'value' ORDER BY col2 DESC
MySQL:
{
"orderby": [
{
"expr": {
"type": "column_ref",
"table": null,
"column": "col2"
},
"type": "DESC"
}
],
}
Postgres:
{
"orderby": [
{
"expr": {
"type": "column_ref",
"table": null,
"column": {
"expr": {
"type": "default",
"value": "col2"
}
}
},
"type": "DESC",
"nulls": null
}
],
}
@tbantle22 I will update MySQL syntax to be compatible with PostgreSQL.
To clarify, I think both should look like the MySQL syntax
To clarify, I think both should look like the MySQL syntax
I responded before I read this. As long as the syntax is the same for both MySQL and Postgres that will be a great help
@tbantle22 ok got it. Sorry for the break changes.
@taozhi8833998 just wanted to see if there was any update on this issue. It looks like the structure is still different in the latest version. Are there still plans to make them the same?