提交 922a4fbe authored 作者: Thomas Mueller's avatar Thomas Mueller

Issue 609: the spatial index did not support NULL.

上级 a6fd251f
......@@ -352,7 +352,7 @@ public class SpatialDataType implements DataType {
return new int[] { firstIndex, lastIndex };
}
ArrayList<Object> getNotNull(ArrayList<Object> list) {
private static ArrayList<Object> getNotNull(ArrayList<Object> list) {
ArrayList<Object> result = null;
for (Object o : list) {
SpatialKey a = (SpatialKey) o;
......
......@@ -941,10 +941,12 @@ public class TestSpatial extends TestBase {
stat.execute("delete from test where the_geom is null");
stat.execute("insert into test values(1, null)");
stat.execute("insert into test values(2, null)");
stat.execute("insert into test values(3, 'POLYGON ((1000 2000, 1000 3000, 2000 3000, 1000 2000))')");
stat.execute("insert into test values(3, " +
"'POLYGON ((1000 2000, 1000 3000, 2000 3000, 1000 2000))')");
stat.execute("insert into test values(4, null)");
stat.execute("insert into test values(5, null)");
stat.execute("insert into test values(6, 'POLYGON ((1000 3000, 1000 4000, 2000 4000, 1000 3000))')");
stat.execute("insert into test values(6, " +
"'POLYGON ((1000 3000, 1000 4000, 2000 4000, 1000 3000))')");
ResultSet rs = stat.executeQuery("select * from test");
int count = 0;
......@@ -977,7 +979,8 @@ public class TestSpatial extends TestBase {
rs = stat.executeQuery(
"select * from test " +
"where intersects(the_geom, 'POLYGON ((1000 1000, 1000 2000, 2000 2000, 1000 1000))')");
"where intersects(the_geom, " +
"'POLYGON ((1000 1000, 1000 2000, 2000 2000, 1000 1000))')");
conn.close();
if (!config.memory) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论