You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
"error": {
"message": "invalid column name: The column '__SELECT__.HASACTIVEENTITY' is invalid in the select list because the GROUP BY clause or an aggregation function does not contain it: line 1 col 229 (at pos 228)",
"code": "260"
}
}
Perhaps not the best solution but this patch seems to help:
Above patch code snippets as text:
// patch: add to groupBy additional columns that are not in the groupBy clause but in the select clausefor(constcolumnoftransformedQuery.SELECT.columns){if(column.ref&&!transformedGroupBy.some(e=>e.ref?.length===column.ref.length&&e.ref.every((p,i)=>p===column.ref[i]))){transformedGroupBy.push(column)}}// end patch
...
// patch: add to groupBy additional columns that are not in the groupBy clause but in the orderBy clausefor(constcolumnoftransformedQuery.SELECT.orderBy){if(column.ref&&transformedQuery.SELECT.groupBy&&!transformedQuery.SELECT.groupBy.some(e=>e.ref?.length===column.ref.length&&e.ref.every((p,i)=>p===column.ref[i]))){transformedQuery.SELECT.groupBy.push(column)}}// end patch
To fix this failure, the second part of my proposed patch could be:
// patch: add to groupBy additional columns that are not in the groupBy clause but in the orderBy clausefor(constcolumnoftransformedQuery.SELECT.orderBy){if(column.ref&&transformedQuery.SELECT.groupBy&&!transformedQuery.SELECT.columns.some(c=>c.func&&c.as===column.ref[0])// <- this is new&&!transformedQuery.SELECT.groupBy.some(e=>e.ref?.length===column.ref.length&&e.ref.every((p,i)=>p===column.ref[i]))){transformedQuery.SELECT.groupBy.push(column)}}// end patch
Feel free to propose a more thorough solution so that such requests do not fail.
Description of erroneous behaviour
GET query in Hana-backed capire/orders service:
Unexpected result:
Perhaps not the best solution but this patch seems to help:
Above patch code snippets as text:
Detailed steps to reproduce
Details about your project
The text was updated successfully, but these errors were encountered: