Bertrand Dechoux
unread,May 27, 2012, 11:17:34 AM5/27/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cascalog-user
1) Can we have multiple named outfields for a predicate?
An example would be (myfn ?varin1 ?varin2 :> ?varout1 ?varout2)
I know a sequence could be returned using a function defined with
defmapcatop but that's not what I am asking. I want to have at the end
at least two different variables (with different names).
Another point, maybe related, is destructuring. I read somewhere that
it was supported by Cascalog but I haven't seen any example of it yet.
How would it look like?
Like this?
(myfn ?varin1 ?varin2 :> [ ?varout1 ?varount2 ])
2) What are your use cases for running multiple taq/query at the same
time? Do you declare everything in the same time or do you build your
argument sequence step by step and then you run everything?
I am asking this question because I would like to know what would be
the best interface for it in java.
run(listOfTaps,listOfQueries) is pretty awful because it is hard to
know which tap is related to which query and there is no compiler
check that the number of taps is the number of queries.
run(tap1,query1,tap2,query2) is a solution. But is not possible to
provided an unlimited typed parameter in java (the first being a tap,
the second a query, the third a tap and so on).
collect.add(tap1,query1).add(tap2,query2).run() seems the best
translation. It is type safe and allows adding tap/query anytime
because the collector could be used as an argument for methods that
might add tap/query.
So if you were asking to run your queries in Java, which one would you
prefer? Why?
Regards,
Bertrand