Re: type of result column after heterogeneous join

From: Marshall Spight <mspight_at_dnai.com>
Date: Mon, 01 Sep 2003 17:28:48 GMT
Message-ID: <klL4b.247195$Oz4.66000_at_rwcrnsc54>


"Paul Vernon" <paul.vernon_at_ukk.ibmm.comm> wrote in message news:bivgp9$1672$1_at_gazette.almaden.ibm.com...
> "Marshall Spight" <mspight_at_dnai.com> wrote in message
> news:pyp4b.315439$Ho3.44679_at_sccrnsc03...
>
> Nice question Marshall.

Thanks. It's been bugging me for a few days.

> So the key to your dilemma is to ask which choice best helps
> define/prevent execution errors.
>
> > 1. None; this causes a type error
> > 2. (int|string)
> > 3. Most specific supertype of int and string. (Possibly 'alpha'.)
> > 4. alpha, the maximal supertype.
>
> With 3 or 4, you effectively have an untyped relational algebra. You might not let
> function parameters get automatically cast up to the most specific supertype and
> therfore preserve some typing, but then you would have introduced a logical
> difference between functions and relations that I for one would prefer not to see.

That's an excellent point that I had completely missed. Yes, avoiding introducing that logical difference should drive the answer. I believe (as you say) it leads straight to 1.

Marshall Received on Mon Sep 01 2003 - 19:28:48 CEST

Original text of this message