Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Nearest Common Ancestor Report (XDb1's $1000 Challenge)

Re: Nearest Common Ancestor Report (XDb1's $1000 Challenge)

From: Hugo Kornelis <hugo_at_pe_NO_rFact.in_SPAM_fo>
Date: Wed, 02 Jun 2004 09:35:32 +0200
Message-ID: <n40rb0h32g7mjdhd8f42ei6r57nh7jmbs3@4ax.com>


On 1 Jun 2004 18:08:03 -0700, Neo wrote:

(snip)
>
>In RM Sol#1, I added the equivalent data:
>
>insert hierarchies (thing, otherthing, hierarchy)
> values ('mary', 'john', 'parent')
>insert hierarchies (thing, otherthing, hierarchy)
> values ('luke', 'john', 'parent')
>
>The command "exec CommonAncestors @hierarchy='parent'" produced the
>following empty report:
>
>Starting time 2004-06-01 19:30:35.390
>Ending time 2004-06-01 19:30:35.420
>
>-------------------------------------------------------------
>I am assuming the report is the same in sol#2. Is this due to db's
>data/schema and/or report procedure? Could you update it/them to make
>it work? Then we would be one step closer toward making an
>apple-to-apple comparison.

Hi Neo,

I already wrote that I am not interested in comparing RM and XDb1. Make your own comparisons if you must.

However, I am always VERY interested in solving bugs in my own code, so I immediately tried to find out what went wrong. I didn't have a copy of the original implementation anymore (replaced it with the better performing second version), but I was able to copy the code from my first message in this discussion. I pasted it in Query Analyzer, added the two insert statements above and changed the parameter on the execute command.

The output I got is below. As you'll see, I was not able to reproduce the bug you encountered.

Output from my tests:

Starting time



2004-06-02 09:33:22.233

Ending time



2004-06-02 09:33:22.233

ThingX ThingY CmnAnc Dist

-------------------- -------------------- -------------------- -----------
john                 luke                 john                 1
john                 mary                 john                 1
luke                 mary                 john                 2


As you see, I did get three rows, one equal to the only line in the report XDb1 apparently generated and two that XDb1 apparently missed. I did not get an empty report like you did. Could you please copy and paste the ENTIRE code you executed in a new message, to enable me to track down and correct this bug? TIA!

Best, Hugo

-- 

(Remove _NO_ and _SPAM_ to get my e-mail address)
Received on Wed Jun 02 2004 - 02:35:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US