cannot pass more than 100 arguments to a function #10031
Unanswered
madhanmetalimits
asked this question in
Question
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need to aggregate some number of columns in a single query, but I can't do that
For example:
this is my query
query Template2 { templateData: Assest_sales_view_aggregate { aggregate { sum { m1 m10 m11 m12 m2 m3 m4 m5 m6 m7 m8 m9 y1 y2 month_end_m1 month_end_m2 month_end_m3 month_end_m4 month_end_m5 month_end_m6 month_end_m7 month_end_m8 month_end_m9 month_end_m10 month_end_m11 month_end_m12 mtd_target_m1 mtd_target_m2 mtd_target_m3 mtd_target_m4 mtd_target_m5 mtd_target_m6 mtd_target_m7 mtd_target_m8 mtd_target_m9 mtd_target_m10 ytd_target_y1 mtd_target_m12 mtd_target_m11 year_end_y13 year_end_y14 year_end_y15 year_end_y16 year_end_y17 year_end_y18 year_end_y19 year_end_y20 year_end_y21 year_end_y22 year_end_y23 year_end_y24 } } } }
while running the above query throws this error
{ "errors": [ { "message": "database query error", "extensions": { "path": "$", "code": "unexpected", "internal": { "arguments": [ "(Oid 114,Just (\"{\\\"x-hasura-role\\\":\\\"admin\\\"}\",Binary))" ], "error": { "description": null, "exec_status": "FatalError", "hint": null, "message": "cannot pass more than 100 arguments to a function", "status_code": "54023" }, "prepared": true, "statement": "SELECT json_build_object('aggregate', json_build_object('sum', json_build_object('m1', sum(\"_root\".\"root.pg.m1\" ), 'm10', sum(\"_root\".\"root.pg.m10\" ), 'm11', sum(\"_root\".\"root.pg.m11\" ), 'm12', sum(\"_root\".\"root.pg.m12\" ), 'm2', sum(\"_root\".\"root.pg.m2\" ), 'm3', sum(\"_root\".\"root.pg.m3\" ), 'm4', sum(\"_root\".\"root.pg.m4\" ), 'm5', sum(\"_root\".\"root.pg.m5\" ), 'm6', sum(\"_root\".\"root.pg.m6\" ), 'm7', sum(\"_root\".\"root.pg.m7\" ), 'm8', sum(\"_root\".\"root.pg.m8\" ), 'm9', sum(\"_root\".\"root.pg.m9\" ), 'y1', sum(\"_root\".\"root.pg.y1\" ), 'y2', sum(\"_root\".\"root.pg.y2\" ), 'month_end_m1', sum(\"_root\".\"root.pg.month_end_m1\" ), 'month_end_m2', sum(\"_root\".\"root.pg.month_end_m2\" ), 'month_end_m3', sum(\"_root\".\"root.pg.month_end_m3\" ), 'month_end_m4', sum(\"_root\".\"root.pg.month_end_m4\" ), 'month_end_m5', sum(\"_root\".\"root.pg.month_end_m5\" ), 'month_end_m6', sum(\"_root\".\"root.pg.month_end_m6\" ), 'month_end_m7', sum(\"_root\".\"root.pg.month_end_m7\" ), 'month_end_m8', sum(\"_root\".\"root.pg.month_end_m8\" ), 'month_end_m9', sum(\"_root\".\"root.pg.month_end_m9\" ), 'month_end_m10', sum(\"_root\".\"root.pg.month_end_m10\" ), 'month_end_m11', sum(\"_root\".\"root.pg.month_end_m11\" ), 'month_end_m12', sum(\"_root\".\"root.pg.month_end_m12\" ), 'mtd_target_m1', sum(\"_root\".\"root.pg.mtd_target_m1\" ), 'mtd_target_m2', sum(\"_root\".\"root.pg.mtd_target_m2\" ), 'mtd_target_m3', sum(\"_root\".\"root.pg.mtd_target_m3\" ), 'mtd_target_m4', sum(\"_root\".\"root.pg.mtd_target_m4\" ), 'mtd_target_m5', sum(\"_root\".\"root.pg.mtd_target_m5\" ), 'mtd_target_m6', sum(\"_root\".\"root.pg.mtd_target_m6\" ), 'mtd_target_m7', sum(\"_root\".\"root.pg.mtd_target_m7\" ), 'mtd_target_m8', sum(\"_root\".\"root.pg.mtd_target_m8\" ), 'mtd_target_m9', sum(\"_root\".\"root.pg.mtd_target_m9\" ), 'mtd_target_m10', sum(\"_root\".\"root.pg.mtd_target_m10\" ), 'ytd_target_y1', sum(\"_root\".\"root.pg.ytd_target_y1\" ), 'mtd_target_m12', sum(\"_root\".\"root.pg.mtd_target_m12\" ), 'mtd_target_m11', sum(\"_root\".\"root.pg.mtd_target_m11\" ), 'year_end_y13', sum(\"_root\".\"root.pg.year_end_y13\" ), 'year_end_y14', sum(\"_root\".\"root.pg.year_end_y14\" ), 'year_end_y15', sum(\"_root\".\"root.pg.year_end_y15\" ), 'year_end_y16', sum(\"_root\".\"root.pg.year_end_y16\" ), 'year_end_y17', sum(\"_root\".\"root.pg.year_end_y17\" ), 'year_end_y18', sum(\"_root\".\"root.pg.year_end_y18\" ), 'year_end_y19', sum(\"_root\".\"root.pg.year_end_y19\" ), 'year_end_y20', sum(\"_root\".\"root.pg.year_end_y20\" ), 'year_end_y21', sum(\"_root\".\"root.pg.year_end_y21\" ), 'year_end_y22', sum(\"_root\".\"root.pg.year_end_y22\" ), 'year_end_y23', sum(\"_root\".\"root.pg.year_end_y23\" ), 'year_end_y24', sum(\"_root\".\"root.pg.year_end_y24\" ) ) ) ) AS \"root\" FROM (SELECT \"_root.base\".\"m1\" AS \"root.pg.m1\", \"_root.base\".\"m10\" AS \"root.pg.m10\", \"_root.base\".\"m11\" AS \"root.pg.m11\", \"_root.base\".\"m12\" AS \"root.pg.m12\", \"_root.base\".\"m2\" AS \"root.pg.m2\", \"_root.base\".\"m3\" AS \"root.pg.m3\", \"_root.base\".\"m4\" AS \"root.pg.m4\", \"_root.base\".\"m5\" AS \"root.pg.m5\", \"_root.base\".\"m6\" AS \"root.pg.m6\", \"_root.base\".\"m7\" AS \"root.pg.m7\", \"_root.base\".\"m8\" AS \"root.pg.m8\", \"_root.base\".\"m9\" AS \"root.pg.m9\", \"_root.base\".\"y1\" AS \"root.pg.y1\", \"_root.base\".\"y2\" AS \"root.pg.y2\", \"_root.base\".\"month_end_m1\" AS \"root.pg.month_end_m1\", \"_root.base\".\"month_end_m2\" AS \"root.pg.month_end_m2\", \"_root.base\".\"month_end_m3\" AS \"root.pg.month_end_m3\", \"_root.base\".\"month_end_m4\" AS \"root.pg.month_end_m4\", \"_root.base\".\"month_end_m5\" AS \"root.pg.month_end_m5\", \"_root.base\".\"month_end_m6\" AS \"root.pg.month_end_m6\", \"_root.base\".\"month_end_m7\" AS \"root.pg.month_end_m7\", \"_root.base\".\"month_end_m8\" AS \"root.pg.month_end_m8\", \"_root.base\".\"month_end_m9\" AS \"root.pg.month_end_m9\", \"_root.base\".\"month_end_m10\" AS \"root.pg.month_end_m10\", \"_root.base\".\"month_end_m11\" AS \"root.pg.month_end_m11\", \"_root.base\".\"month_end_m12\" AS \"root.pg.month_end_m12\", \"_root.base\".\"mtd_target_m1\" AS \"root.pg.mtd_target_m1\", \"_root.base\".\"mtd_target_m2\" AS \"root.pg.mtd_target_m2\", \"_root.base\".\"mtd_target_m3\" AS \"root.pg.mtd_target_m3\", \"_root.base\".\"mtd_target_m4\" AS \"root.pg.mtd_target_m4\", \"_root.base\".\"mtd_target_m5\" AS \"root.pg.mtd_target_m5\", \"_root.base\".\"mtd_target_m6\" AS \"root.pg.mtd_target_m6\", \"_root.base\".\"mtd_target_m7\" AS \"root.pg.mtd_target_m7\", \"_root.base\".\"mtd_target_m8\" AS \"root.pg.mtd_target_m8\", \"_root.base\".\"mtd_target_m9\" AS \"root.pg.mtd_target_m9\", \"_root.base\".\"mtd_target_m10\" AS \"root.pg.mtd_target_m10\", \"_root.base\".\"ytd_target_y1\" AS \"root.pg.ytd_target_y1\", \"_root.base\".\"mtd_target_m12\" AS \"root.pg.mtd_target_m12\", \"_root.base\".\"mtd_target_m11\" AS \"root.pg.mtd_target_m11\", \"_root.base\".\"year_end_y13\" AS \"root.pg.year_end_y13\", \"_root.base\".\"year_end_y14\" AS \"root.pg.year_end_y14\", \"_root.base\".\"year_end_y15\" AS \"root.pg.year_end_y15\", \"_root.base\".\"year_end_y16\" AS \"root.pg.year_end_y16\", \"_root.base\".\"year_end_y17\" AS \"root.pg.year_end_y17\", \"_root.base\".\"year_end_y18\" AS \"root.pg.year_end_y18\", \"_root.base\".\"year_end_y19\" AS \"root.pg.year_end_y19\", \"_root.base\".\"year_end_y20\" AS \"root.pg.year_end_y20\", \"_root.base\".\"year_end_y21\" AS \"root.pg.year_end_y21\", \"_root.base\".\"year_end_y22\" AS \"root.pg.year_end_y22\", \"_root.base\".\"year_end_y23\" AS \"root.pg.year_end_y23\", \"_root.base\".\"year_end_y24\" AS \"root.pg.year_end_y24\" FROM (SELECT * FROM \"public\".\"Assest_sales_view\" WHERE ('true') ) AS \"_root.base\" ) AS \"_root\" " } } } ] }
Beta Was this translation helpful? Give feedback.
All reactions