← Back to team overview

maria-developers team mailing list archive

Exposing Item::store_native and val_native to the SQL layer

 

Hello Bar,

As you have done the work on store_native and val_native, I would
especially like to know your thoughts with regards to how to expose these
to the SQL layer.

In my particular case, I'd like to re-work the "Add FLOAT and DOUBLE data
interchange functions" patch (
https://github.com/ericherman/mariadb-server/commit/dcc7ccf65689bd7d84bef37c0985c03fa7a7cb13
) to use these new API functions.

I've only just started on this task (
https://github.com/ericherman/mariadb-server/tree/10.4-eherman-float-native
) and first thing that I need to figure out is how to write the tests.

In commit 34eb98387f8f46a80fb053081dbe20d415f23b39 ( MDEV-13995
MAX(timestamp) returns a wrong result near DST change ), I see that in
tests the SQL calls various time functions which ultimately call into these
functions, yet I do not see any way to access these two new functions
directly.

Are you thinking of adding new SQL functions to expose the underlying bytes
to the user? If not, I have a sense that casting to and from BINARY could
expose the native byte arrays, but I'm not sure if that's the direction you
imagine.

If you tell me which direction to go, I will try to make that happen.

Cheers,
 -Eric


Other foo_native related commits:
* commit a8a757c6bb32bbf291afdf33df861127489889ab
  wl#173 - temporal types with sub-second resolution

* commit c353b2a8fc10e16107ee6c7e26877f4243d4eaef
  MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with
timestamp, NULLIF, GROUP BY

--

Follow ups