{"action":"opened","issue":{"url":"https://api.github.com/repos/greenlion/swanhart-tools/issues/112","labels_url":"https://api.github.com/repos/greenlion/swanhart-tools/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/greenlion/swanhart-tools/issues/112/comments","events_url":"https://api.github.com/repos/greenlion/swanhart-tools/issues/112/events","html_url":"https://github.com/greenlion/swanhart-tools/issues/112","id":58077464,"number":112,"title":"Unable to make AVG function to work in flexviews","user":{"login":"gamer154","id":11060826,"avatar_url":"https://avatars.githubusercontent.com/u/11060826?v=3","gravatar_id":"","url":"https://api.github.com/users/gamer154","html_url":"https://github.com/gamer154","followers_url":"https://api.github.com/users/gamer154/followers","following_url":"https://api.github.com/users/gamer154/following{/other_user}","gists_url":"https://api.github.com/users/gamer154/gists{/gist_id}","starred_url":"https://api.github.com/users/gamer154/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gamer154/subscriptions","organizations_url":"https://api.github.com/users/gamer154/orgs","repos_url":"https://api.github.com/users/gamer154/repos","events_url":"https://api.github.com/users/gamer154/events{/privacy}","received_events_url":"https://api.github.com/users/gamer154/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-18T14:53:13Z","updated_at":"2015-02-18T14:53:13Z","closed_at":null,"body":"Hello,\r\n\r\nI am unable to get the AVG function to work in flexviews. I am adding the expression into the table properly but the error I am getting is; 08:45:08\tcall flexviews.enable(@mvid1)\tError Code: 1644. COULD NOT VALIDATE MATERIALIZED VIEW.  CHECK @MV_DEBUG.\t0.110 sec\r\n\r\nI can't seem to find @MV_DEBUG. I am not sure where that error is pointing towards. If there is a way to debug or troubleshoot it then please let me know. Here is the snippet of code that I am trying to execute;\r\n\r\n-- Code Start\r\ndelete from flexviews.mview;\r\ndrop database if exists test;\r\n\r\ncreate database if not exists test;\r\n\r\nuse test;\r\n\r\ndrop table if exists t1;\r\n\r\ncreate table test.t1(\r\nc1 int,\r\nc2 int)\r\nengine=innodb;\r\n\r\ninsert into test.t1 values (1,1);\r\ninsert into test.t1 values (2,2);\r\n\r\ncall flexviews.create_mvlog('test','t1');\r\n\r\ncall flexviews.create('test','mv1','INCREMENTAL');\r\nset @mvid1 := last_insert_id();\r\n\r\ncall flexviews.add_table(@mvid1, 'test','t1', 't1', null);\r\n-- call flexviews.add_expr(@mvid1, 'SUM','t1.c1','the_sum');\r\ncall flexviews.add_expr(@mvid1, 'AVG','t1.c1','the_avg');\r\n\r\ncall flexviews.enable(@mvid1);\r\n\r\nselect * from test.mv1;\r\n-- Code end\r\n\r\nI am testing the flexviews to understand how it works. The SUM and count function works properly in add_expr but AVG and Percentile functions do not work for me. Please let me know what I can do to troubleshoot the issue. Thanks in advance. "}}