AlexTatiyants / pev

Postgres Explain Visualizer
MIT License
2.77k stars 194 forks source link

Complicated grouping sets render as [object Object] #25

Open ziggythehamster opened 7 years ago

ziggythehamster commented 7 years ago

I see this listed under "grouping sets":

[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

My JSON has entries like this:

      "Grouping Sets": [
        {
          "Group Keys": [
            ["tbl.year", "tbl.month", "tbl.foo_id", "tbl.day_of_month", "tbl.hour", "tbl.bar_id", "tbl.baz_id"],
            ["tbl.year", "tbl.month", "tbl.foo_id", "tbl.day_of_month", "tbl.hour"],
            ["tbl.year", "tbl.month", "tbl.foo_id", "tbl.day_of_month"],
            ["tbl.year", "tbl.month", "tbl.foo_id"],
            ["tbl.year", "tbl.month"],
            ["tbl.year"],
            []
          ]
        },
        {
          "Sort Key": ["tbl.bar_id", "tbl.baz_id", "tbl.xxx_id", "tbl.year", "tbl.month", "tbl.day_of_month", "tbl.hour"],
          "Group Keys": [
            ["tbl.bar_id", "tbl.baz_id", "tbl.xxx_id", "tbl.year", "tbl.month", "tbl.day_of_month", "tbl.hour"],
            ["tbl.bar_id", "tbl.baz_id", "tbl.xxx_id", "tbl.year", "tbl.month"],
            ["tbl.bar_id", "tbl.baz_id", "tbl.xxx_id", "tbl.year"],
            ["tbl.bar_id", "tbl.baz_id", "tbl.xxx_id"],
            ["tbl.bar_id", "tbl.baz_id"],
            ["tbl.bar_id"]
          ]
        }
      ]

...and so on. Presumably, less complicated grouping sets come out differently :)

AlexTatiyants commented 7 years ago

I haven't ran across this before. Do you have the full plan I can look at?

ziggythehamster commented 7 years ago

I e-mailed you the query and the resulting plan.