You don't need to have the according triples in your store. The
ARC2_StoreSelectQueryHandler quits with the following message:
Not all patterns could be rewritten to SQL JOINs in
ARC2_StoreSelectQueryHandler
Unknown column 'T_0_0_0.s' in 'field list' via
ARC2_StoreSelectQueryHandler
I tried to find out why this happens. it works well if the query is
executed the way it is. However bengee seems to try to optimize the
querys and therefore changes the indexes in function function getSQL()
{ line 56. The problem is that in line 72 he tries to find a better
query five times. If no better query was found, the best found will be
used.
As you can see this part of the current code makes problems. I
therefore suggest line 72 to 87 in ARC2_StoreSelectQueryHandler.
Another solution would be to try the rearranging and get back to the
old version if an error was found. However I tried this and the
remaining query throws the wrong result as line 77 preferes shorter
versions of the query if the same number of dependencies is selected.
A "wrong" query is always shorter therefore giving wrong results.
> You don't need to have the according triples in your store. The
> ARC2_StoreSelectQueryHandler quits with the following message:
> Not all patterns could be rewritten to SQL JOINs in
> ARC2_StoreSelectQueryHandler
> Unknown column 'T_0_0_0.s' in 'field list' via
> ARC2_StoreSelectQueryHandler
> I tried to find out why this happens. it works well if the query is
> executed the way it is. However bengee seems to try to optimize the
> querys and therefore changes the indexes in function function getSQL()
> { line 56. The problem is that in line 72 he tries to find a better
> query five times. If no better query was found, the best found will be
> used.
> As you can see this part of the current code makes problems. I
> therefore suggest line 72 to 87 in ARC2_StoreSelectQueryHandler.
> Another solution would be to try the rearranging and get back to the
> old version if an error was found. However I tried this and the
> remaining query throws the wrong result as line 77 preferes shorter
> versions of the query if the same number of dependencies is selected.
> A "wrong" query is always shorter therefore giving wrong results.
> > You don't need to have the according triples in your store. The
> > ARC2_StoreSelectQueryHandler quits with the following message:
> > Not all patterns could be rewritten to SQL JOINs in
> > ARC2_StoreSelectQueryHandler
> > Unknown column 'T_0_0_0.s' in 'field list' via
> > ARC2_StoreSelectQueryHandler
> > I tried to find out why this happens. it works well if the query is
> > executed the way it is. However bengee seems to try to optimize the
> > querys and therefore changes the indexes in function function getSQL()
> > { line 56. The problem is that in line 72 he tries to find a better
> > query five times. If no better query was found, the best found will be
> > used.
> > As you can see this part of the current code makes problems. I
> > therefore suggest line 72 to 87 in ARC2_StoreSelectQueryHandler.
> > Another solution would be to try the rearranging and get back to the
> > old version if an error was found. However I tried this and the
> > remaining query throws the wrong result as line 77 preferes shorter
> > versions of the query if the same number of dependencies is selected.
> > A "wrong" query is always shorter therefore giving wrong results.
> Datum: Fri, 11 Mar 2011 16:19:07 -0800 (PST) > Von: zd <perfectsta...@gmail.com> > An: arc-dev <arc-dev@googlegroups.com> > Betreff: [arc-dev] Re: Bug in ARC2 when more the same uri is used more than 7 times > Hello,
> Has there been a patch applied or a release in which this has been > fixed?
> On Mar 4, 5:04 am, Knurg <Kn...@gmx.de> wrote: > > Upon doing some more research we found the source of the problem.
> > Line 619 and 620 of ARC2_StoreSelectQueryHandler: > > $deps[$id]['rank'] += ($id != $other_id) && preg_match('/' . > > $other_id . '/', $code) ? 1 : 0; > > $deps[$id][$other_id] = ($id != $other_id) && preg_match('/' > . > > $other_id . '/', $code) ? 1 : 0; > > The preg_match must be: > > $deps[$id]['rank'] += ($id != $other_id) && preg_match('/' . > > $other_id . '\\D/', $code) ? 1 : 0; > > $deps[$id][$other_id] = ($id != $other_id) && preg_match('/' > . > > $other_id . '\\D/', $code) ? 1 : 0; > > because otherwise T_0_0_1 matches T_0_0_10 or T_0_0_13 although there > > is no connection between them.
> > > You don't need to have the according triples in your store. The > > > ARC2_StoreSelectQueryHandler quits with the following message: > > > Not all patterns could be rewritten to SQL JOINs in > > > ARC2_StoreSelectQueryHandler > > > Unknown column 'T_0_0_0.s' in 'field list' via > > > ARC2_StoreSelectQueryHandler
> > > I tried to find out why this happens. it works well if the query is > > > executed the way it is. However bengee seems to try to optimize the > > > querys and therefore changes the indexes in function function getSQL() > > > { line 56. The problem is that in line 72 he tries to find a better > > > query five times. If no better query was found, the best found will be > > > used.
> > > As you can see this part of the current code makes problems. I > > > therefore suggest line 72 to 87 in ARC2_StoreSelectQueryHandler. > > > Another solution would be to try the rearranging and get back to the > > > old version if an error was found. However I tried this and the > > > remaining query throws the wrong result as line 77 preferes shorter > > > versions of the query if the same number of dependencies is selected. > > > A "wrong" query is always shorter therefore giving wrong results.
Discussion subject changed to "Bug fixing and reference version ? - Was: Re: [arc-dev] Re: Bug in ARC2 when more the same uri is used more than 7 times" by Olivier Berger
Now that development by original author is stopped, it would be great to try and avoid splitting completely, and at least keep track of useful patches...
Any new candidate maintainerto merge these into a single repo ?
yes, this is a good idea, and people can link to the branch where there are fixing the bug, so it can be tested and maybe pulled into the main repo.
> Now that development by original author is stopped, it would be great to > try and avoid splitting completely, and at least keep track of useful > patches...
> Any new candidate maintainerto merge these into a single repo ?
This question has come up several time now that the code has moved to Github:
1. Before we start modifying the main branch, we really ought to have some solid unit tests to make sure patches don't break anything else in ARC2. I remember Bengee had some tests on his local machine but I don't think he posted them anywhere, so we might want to start from scratch. Anyone familiar with RDF libraries unit testing? maybe we could look at how other libraries do it, and make use of the test suites available for each spec (I know the SPARQL spec have some for example).
2. Since we're using github, we can use their collaborative components like leaving comments under the commits, such as this message Bengee left [1]. This way we could "vote" on whether a commit should be merged in the main repository, or not.
Anyone else have other ideas on how to move forward?