Skip to content

Commit 869b4c2

Browse files
StefanoPetrilliahmedibrahim404jhaugliddahlerlendnryeng
authored andcommitted
MDEV-34276: Implements the function ST_IsValid
The GIS function ST_Simplify takes ad input a geometry and returns 1 if the argument is geometrically valid, 0 if the argument is not geometrically valid. Author: StefanoPetrilli <stefanop_1999@hotmail.it> Co-authored-by: Ahmed Ibrahim <ahmed.ibr.hashim@gmail.com> Co-authored-by: Jon Olav Hauglid <jon.hauglid@oracle.com> Co-authored-by: Erlend Dahl <erlend.dahl@oracle.com> Co-authored-by: Norvald H. Ryeng <norvald.ryeng@oracle.com> Co-authored-by: Menelaos Karavelas <menelaos.karavelas@oracle.com> Co-authored-by: David.Zhao <david.zhao@oracle.com> Co-authored-by: Pavan <pavan.naik@oracle.com>
1 parent ba66f8f commit 869b4c2

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

mysql-test/main/spatial_utility_function_isvalid.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Copyright (c) 2014, Oracle and/or its affiliates
32
# Copyright (c) 2024, MariaDB Corporation.
43
#

sql/item_geofunc.cc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4284,6 +4284,36 @@ class Create_func_isempty : public Create_func_arg1
42844284
};
42854285

42864286

4287+
class Create_func_isvalid : public Create_func_arg1
4288+
{
4289+
public:
4290+
Item *create_1_arg(THD *thd, Item *arg1) override
4291+
{
4292+
return new (thd->mem_root) Item_func_isvalid(thd, arg1);
4293+
}
4294+
4295+
static Create_func_isvalid s_singleton;
4296+
4297+
protected:
4298+
Create_func_isvalid() = default;
4299+
virtual ~Create_func_isvalid() = default;
4300+
};
4301+
4302+
class Create_func_isvalid : public Create_func_arg1
4303+
{
4304+
public:
4305+
Item *create_1_arg(THD *thd, Item *arg1) override
4306+
{
4307+
return new (thd->mem_root) Item_func_isvalid(thd, arg1);
4308+
}
4309+
4310+
static Create_func_isvalid s_singleton;
4311+
4312+
protected:
4313+
Create_func_isvalid() = default;
4314+
virtual ~Create_func_isvalid() = default;
4315+
};
4316+
42874317
class Create_func_isvalid : public Create_func_arg1
42884318
{
42894319
public:

0 commit comments

Comments
 (0)