[erlang-questions] bug in qlc:info ?

Wojciech Kaczmarek kaczmarek.w@REDACTED
Wed Mar 19 18:29:32 CET 2008


Hello,

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:

> qlc:e(qlc:sort(qlc:q([X||X<-[2,1]]))).
[1,2]
> qlc:info(qlc:sort(qlc:q([X||X<-[2,1]]))).
"qlc:sort(\"\\002\\001\", [])"

now with explicit order fun:

> qlc:e( qlc:sort(qlc:q([X||X<-[1,2]]), {order, fun(A,B)-> A>B end} )).
[2,1]
> qlc:info( qlc:sort(qlc:q([X||X<-[1,2]]), {order, fun(A,B)-> A>B end} )).

=ERROR REPORT==== 19-Mar-2008::18:17:28 ===
Error in process <0.280.0> on node 't0@REDACTED' 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}]}

** exited: {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}]} **

Is this expected?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080319/3611b1d9/attachment.htm>


More information about the erlang-questions mailing list