Hi,
Ā As I split a QueryModel apart by the Concatās, some redundancies occur. For example:
Ā
from Int32 r in {from ntup r in value(LINQToTTreeLib.Tests.QMExtractorQueriable`1[LINQToTTreeLib.Tests.ntup]) select [r].run} select ([r] * 2) => Count()
Ā
Ā If I were to feed a query that looked like this to re-linq, Iād see something more along the lines of (it combines several Select statements):
Ā
from ntup r in value(LINQToTTreeLib.Tests.QMExtractorQueriable`1[LINQToTTreeLib.Tests.ntup]) select (([r].run + 1) * 2) => Count().
Ā
Ā Which is a lot more concise. Is there some way I can call the optimizer in my code? The way the more complex sequence is generated is understandable: when Concat statements are in the query, the āfrom Int32 r inā¦ā makes total sense. But after their removal, that outter from is no longer needed. Being able to optimize it away would make my code cleaner, and testing easier (too).
Ā
Ā Many thanks!
Ā
Cheers,
Gordon
Ā
Hi,
Ā Ha! Ok, so it isnāt available at this moment? No worries.
Ā
Ā And yes, look for the method calls āCheckQueryā that are commented out. Those have the issue. Iād put this in the ConcatQuerySplitter, actually, so the QMās that it returns for scanning were as optimized as the ones that were handed to me by re-linq in the first place.
Ā
Ā At the moment this is not a show stopper for me: so far the (simple) queries Iāve done with the Concat operator have not caused issues being translated to C++. Iām slowly building up more and more complex queries, testing out the system, and I will let you know if something like this becomes a real issue.
Ā
Cheers,
Gordon
fromĀ Int32Ā rĀ inĀ {fromĀ ntupĀ rĀ inĀ value(LINQToTTreeLib.Tests.QMExtractorQueriable`1[LINQToTTreeLib.Tests.ntup])Ā selectĀ [r].run}Ā selectĀ ([r]Ā *Ā 2)Ā =>Ā Count() fromĀ ntupĀ rĀ inĀ value(LINQToTTreeLib.Tests.QMExtractorQueriable`1[LINQToTTreeLib.Tests.ntup])Ā selectĀ [r].runĀ =>Ā Count() fromĀ Int32Ā rĀ inĀ {fromĀ ntupĀ rĀ inĀ value(LINQToTTreeLib.Tests.QMExtractorQueriable`1[LINQToTTreeLib.Tests.ntup])Ā selectĀ [r].run}Ā selectĀ ([r]Ā *Ā 2)Ā =>Ā Count()
After:
fromĀ ntupĀ rĀ inĀ value(LINQToTTreeLib.Tests.QMExtractorQueriable`1[LINQToTTreeLib.Tests.ntup])Ā selectĀ ([r].runĀ *Ā 2)Ā =>Ā Count() fromĀ ntupĀ rĀ inĀ value(LINQToTTreeLib.Tests.QMExtractorQueriable`1[LINQToTTreeLib.Tests.ntup])Ā selectĀ [r].runĀ =>Ā Count() fromĀ ntupĀ rĀ inĀ value(LINQToTTreeLib.Tests.QMExtractorQueriable`1[LINQToTTreeLib.Tests.ntup])Ā selectĀ ([r].runĀ *Ā 2)Ā =>Ā Count()
To unsubscribe from this group and stop receiving emails from it, send an email to re-motion-users+unsubscribe@googlegroups.com.
To post to this group, send email to re-motion-users@googlegroups.com.
Wow! Thanks!! I will take a look at this later on today. Iāll post back with result. And thanks for spending some of your weekend on this. š
Ā
And Iām amazed you were able to check out my code and just have it āworkā. There are some pretty complex dependencies in there! Go for continuous build integration!
Ā
And when you get a chance, the QueryModel.Clone guy is a bit of a show stopper for me. š Iām happy to do more debugging now that Iāve gotten relinq to build and all tests to pass (btw, would you accept a small pull request with a readme that contains a section on getting your machine ready to build with it?). However, Iām afraid I donāt actually know what that query model should look like.
Hi,
Ā Ok ā I put this in. Works like a charm, thanks!!
Ā
Ā I removed the WrapSQE and replaced it with flattenās as you suggested. Anything that makes the code shorter and less complex. š
Ā
Ā Again, thanks so much for spending time on this!
Ā
Cheers,
Gordon.
Hi,
Ā Ok ā I put this in. Works like a charm, thanks!!
Hi,
Ā Ah rightā¦ That is a problem with this system ā since I build against a C++ library, I have to use the version of the compiler that the C++ library was built against. That is currently an āolderā one, so that has to be installed. So if you donāt have that installed on your system, that can cause some major pain. Iām glad after that it built (a lot of tests would have probably failed, however, if you ran-all).
Ā
Ā Ok ā I will take a look at the updates!
Ā
Ā Thanks so much for looking at the Clone issue. That turns out to rear its head in all but the most simple queries when using the Concat operator. It is actually present w/out the Concat operator (as you can see in the small test case I wrote), however, Clone is just never called on those normal queires in re-linq, so the bug is not seen.
Ā
Ā It could also be that Iām using Clone in a way that it shouldnāt be. In which case Iād definitely appreciate advice on how to split up QueryModels when doing the Concat splitting!
Ā
Ā Thanks in advance to looking at these!
Ā
Cheers,
Gordon.
Ā
From: Michael Ketting
Sent: Sunday, February 28, 2016 11:26 PM
To: re-motion Users
Cc: michael...@rubicon.eu