Ah, my apologies, I see your problem, I'm a bit slow today.
I don't think there is any way to implement what you want without
modifying the H2 source code.
But I don't think that is a problem.
If you want to implement a new BoundingBox index type, then we can
include that directly into H2.
We would probably need to implement ST_Intersects as a new comparison
type inside H2, and make it use the BoundingBox index.
I can hook up the parsing and basic infrastructure for you, but I don't
know enough to implement a new index type.
On 2013-05-21 14:19, Nicolas Fortin (OrbisGIS) wrote:
Using the h2 table function the sql would be somewhat like this:
select * from ST_Intersects(spatialTable, 'the_geom' ,
ST_PolyFromText('POLYGON ((67 13, 67 18, 59 18, 59 13, 67 13))',1));
Here the function is in the FROM , not in the WHERE. Using index must
be transparent to users.
Le mardi 21 mai 2013 14:06:08 UTC+2, Noel Grandin a écrit :
I don't understand the problem?
What I'm saying is that you can define a function called
ST_Intersects using CREATE ALIAS,
and inside that function you can implement the necessary logic.
From the perspective of a user of your extension, it should look
like a normal part of the database.
Or you are asking about something different?
On 2013-05-21 13:27, Nicolas Fortin (OrbisGIS) wrote:
I know function table but this lead to modifying the sql request
and it is not in standard.
Le mardi 21 mai 2013 11:52:15 UTC+2, Noel Grandin a écrit :
See the section title "Using a function as a table" here
http://h2database.com/html/features.html#user_defined_functions
<http://h2database.com/html/features.html#user_defined_functions>
On 2013-05-21 10:07, Nicolas Fortin (OrbisGIS) wrote:
Discussion about user defined index on OTHER type.
In spatial SQL the following request on an indexed geometry
column would use spatial index:
select * from spatialTable where ST_Intersects(the_geom,
ST_PolyFromText('POLYGON ((67 13, 67 18, 59 18, 59 13,
67 13))',1));
Usage of ST_Intersects filter the_geom field by using
BoundingBox stored index of the spatialTable, then the
method is applied on filtered rows.
Can I do this by creating my own TableEngine ? There is an
easier way without modifying the sql request ? Maybe a way
to let special kind of function to alter the execution plan ?
Thanks for your support.
--
You received this message because you are subscribed to the
Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails
from it, send an email to h2-database...@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at
http://groups.google.com/group/h2-database?hl=en
<http://groups.google.com/group/h2-database?hl=en>.
For more options, visit
https://groups.google.com/groups/opt_out
<https://groups.google.com/groups/opt_out>.
--
You received this message because you are subscribed to the
Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to h2-database...@googlegroups.com <javascript:>.
To post to this group, send email to h2-da...@googlegroups.com
<javascript:>.
Visit this group at
http://groups.google.com/group/h2-database?hl=en
<http://groups.google.com/group/h2-database?hl=en>.
For more options, visit https://groups.google.com/groups/opt_out
<https://groups.google.com/groups/opt_out>.
--
You received this message because you are subscribed to the Google
Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.