Hi Monty,

> So I'd say it's the type's responsibility to:
>
> 1) piggyback on a general storage that makes sense (string, byte[], int,
> etc)
> 2) provide a binary encoding for itself
> 3) optionally, provide a sort method if its binary encoding can't be
> directly sorted.

I still think it makes sense to allow the type to specify its equals
method, and perhaps things like a hashcode method, perhaps there are
others. If you know your type, you may be able to write a more
efficient hash than a generic one, which may be useful for partioning
and indexes.

>
> As with all things, hopefully people will realize that likely 3 will be
> less efficient if used. On the other hand, perhaps pluggable sort
> functions would be something that people can do something clever with.

Well, I am not sure. Some types may allow for really cheap decisions
on "am i larger or smaller than the argument", and could be faster
than byte by byte comparison. But yes, a default or fallback should be
used if none was provided.

> Additionally, again if we have access to this client-side, then it would
> also be easy to tell the server to just return the rows unsorted and let
> us do it client side. Doesn't help in the sort then limit 10
> environments ... but could be useful in spreading some of that load.

I am not so convinced its a good idea to put logic that may affect the
result in the client, but maybe that's just a habit - I am not an
architect, maybe I am overreacting.

Regards,

ROland

>
> Monty
>
>> kind regards,
>>
>> Roland
>>
>>> Same thing with IP addresses, right? If you throw binary version of one
>>> into a column, it'll sort fine and respond to equality fine. Yet you
>>> don't want to have to wrap all of your calls with inet_aton() or something.
>>>
>>> The server can then do things like find ranges or equalities of values,
>>> and the UDTs can take care of encoding or decoding those things into a
>>> form that makes sense for the user. No?
>>>
>>> but yes... query execution certainly has to happen on the server... else
>>> I'm not entirely sure what the server does. :)
>>>
>>> Monty
>>>
>>>
>>>
>>
>>
>>
>
>



-- 
Roland Bouman
http://rpbouman.blogspot.com/

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to