From: <tr...@do...> - 2013-04-24 11:22:13
|
<p>The following issue has been added to a project that you are monitoring.</p> <table border="0"> <tr> <td width="90px" valign="top"><b>Title:</b></td> <td>Feature request : add a virtualcount property to SparqlResultSet</td> </tr> <tr> <td><b>Project:</b></td> <td>Core Library (dotNetRDF.dll)</td> </tr> <tr> <td><b>Created By:</b></td> <td>Max</td> </tr> <tr> <td><b>Milestone:</b></td> <td>Unassigned</td> </tr> <tr> <td><b>Category:</b></td> <td>Query</td> </tr> <tr> <td><b>Priority:</b></td> <td>Unassigned</td> </tr> <tr> <td><b>Type:</b></td> <td>New Feature</td> </tr> <tr> <td><b>Description:</b></td> </tr> <tr> <td colspan="2"><p> It would be nice to have a VirtualCount stats property along with Count on SparqlResultSet objects when the source query specify a LIMIT clause, thus it would avoid running the query twice to get results and stats separately (not sure whether it is the best place, so I leave this to your considération)</p> <p> This property would get the number of results that would be returned without the LIMIT clause (or -1 if not supported by the underlying store/service, so I suppose it would be used mainly by InMemory store ?)</p> <p> As it is, since I'm not yet familiar with the library architecture, I coul not add at the sparqlResultSet level so I "hacked" it into the SparqlQuery object instead.</p> <p> Here are the modifications I made (sorry to get those as is, I'm trying !! but I'm also not very familiar with the tools you use, though I hope to be able to collaborate more in the future)</p> <p> Libraries\core\net40\Query\SparqlQuery.cs on line 267</p> <p> private int _virtualCount = -1;<br /> public int VirtualCount<br /> {<br /> get<br /> {<br /> return this._virtualCount;<br /> }<br /> internal set<br /> {<br /> this._virtualCount = value;<br /> }<br /> }</p> <p> Libraries\core\net40\Query\QueryExtensions.cs on line 117<br /> q.VirtualCount = context.OutputMultiset.VirtualCount;</p> <p> Libraries\core\net40\Query\Algebra\BaseMultiset.cs on line 45<br /> public int VirtualCount;</p> <p> Libraries\core\net40\Query\Algebra\Slice.cs on line 108<br /> context.InputMultiset.VirtualCount = context.InputMultiset.Count;<br /> </p> <p> Best regards,</p> <p> Max.</p></td> </tr> </table> <p> More information on this issue can be found at <a href="http://www.dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=352" target="_blank">http://www.dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=352</a></p> <p style="text-align:center;font-size:8pt;padding:5px;"> If you no longer wish to receive notifications, please visit <a href="http://www.dotnetrdf.org/tracker/Account/UserProfile.aspx" target="_blank">your profile</a> and change your notifications options. </p> |