v.20.5Experimental Feature
Add Point and Polygon Data Types to ClickHouse
Add data typePoint(Tuple(Float64, Float64)) andPolygon(Array(Array(Tuple(Float64, Float64))). #10678 (Alexey Ilyukhov).
Why it matters
These new data types enable efficient storage and manipulation of spatial data within ClickHouse, allowing users to handle geometric points and polygons natively. This simplifies working with spatial data for applications such as location-based analytics and geographic information systems.How to use it
Use thePoint data type as a Tuple(Float64, Float64) to represent a coordinate pair (x, y). Use the Polygon data type as an Array(Array(Tuple(Float64, Float64))) to represent polygons, where each inner array represents a ring of points. Define columns with these types when creating tables to store geometric data.