Hello,<br><br>I was looking at various optimizations of my sandbox mnesia queries given by qlc:info when I encountered a strange behaviour: qlc:info raises an error for a query containing sorting with explicit order function. I see it doesn't depend on a table type - you can try a following simple example:<br>
<br>> qlc:e(qlc:sort(qlc:q([X||X<-[2,1]]))).   <br>[1,2]<br>> qlc:info(qlc:sort(qlc:q([X||X<-[2,1]]))).<br>"qlc:sort(\"\\002\\001\", [])"<br><br>now with explicit order fun:<br><br>> qlc:e( qlc:sort(qlc:q([X||X<-[1,2]]), {order, fun(A,B)-> A>B end} )).<br>
[2,1]<br>> qlc:info( qlc:sort(qlc:q([X||X<-[1,2]]), {order, fun(A,B)-> A>B end} )).<br><br>=ERROR REPORT==== 19-Mar-2008::18:17:28 ===<br>Error in process <0.280.0> on node '<a href="mailto:t0@vault108.local">t0@vault108.local</a>' with exit value: {function_clause,[{erl_parse,abstract,[#Fun<erl_eval.12.102015280>,1]},{erl_parse,abstract_list,2},{erl_parse,abstract_list,2},{erl_parse,abstract,2},{erl_parse,abstract,2},{qlc,abstract,2},{qlc,abstract,3},{qlc,info,2}]}<br>
<br>** exited: {function_clause,<br>               [{erl_parse,abstract,[#Fun<erl_eval.12.102015280>,1]},<br>                {erl_parse,abstract_list,2},<br>                {erl_parse,abstract_list,2},<br>                {erl_parse,abstract,2},<br>
                {erl_parse,abstract,2},<br>                {qlc,abstract,2},<br>                {qlc,abstract,3},<br>                {qlc,info,2}]} **<br><br>Is this expected? <br>