databendlabs / databend

𝗗𝗮𝘁𝗮, 𝗔𝗻𝗮𝗹𝘆𝘁𝗶𝗰𝘀 & 𝗔𝗜. Modern alternative to Snowflake. Cost-effective and simple for massive-scale analytics. https://databend.com
https://docs.databend.com
Other
7.88k stars 751 forks source link

bug: Geometry need to have an equal function #16839

Open cdmikechen opened 1 week ago

cdmikechen commented 1 week ago

Search before asking

Version

v1.2.653-nightly

What's Wrong?

SQL 错误: Failover Retry Error executing query after 0 failover retry: SQL: select * from a, b where a.point=b.point
 Query failed: QueryErrors{code=1065, message=error: 
  --> SQL:1:33
  |
1 | select * from a, b where a.point=b.point
  |                                 ^ no function matches signature `eq(Geometry NULL, Geometry NULL)`, you might need to add explicit type casts.

candidate functions:
  eq(Variant, Variant) :: Boolean                               : unable to unify `Geometry NULL` with `Variant`
  eq(Variant NULL, Variant NULL) :: Boolean NULL                : unable to unify `Geometry` with `Variant`
  eq(String, String) :: Boolean                                 : unable to unify `Geometry NULL` with `String`
... and 31 more

} cause: null

Geometry should either support the = operator, or have an equal function, such as ST_Equals.

How to Reproduce?

set enable_geo_create_table=1
create table a (point geometry);
create table b (point geometry);
select * from a, b where a.point=b.point

Are you willing to submit PR?