SQL Select-Item Aggregation in JSONified Expression #1714
Replies: 2 comments 6 replies
-
Greeetings. please always provide a concrete sql sample. |
Beta Was this translation helpful? Give feedback.
-
Yes, I understand that very well because I have had to solve exactly the same challenge for printing an useful AST (as shown in the screenshot). Truth is, JSQLParser has not been developed with Serialization of the AST in mind. You will need to write your own Jackson Serializer and Deserializer for a few of the Objects, telling which attributes and properties to consider. We can work on this together since I have started something like that in the For all |
Beta Was this translation helpful? Give feedback.
-
Given the following SQL select item
group_concat(distinct myTable.Name) as Name,
snippet from a Select query, it would be nice if the JSON generated by, for example, Jackson/FasterXML's ObjectMapper, would include thegroup_concat
aggregation function as a property.Currently, the SQL is being parsed as a SelectExpressionItem with the expression being a MySQLGroupConcat, but when JSONified, the information about which aggregation function was used is lost. Am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions