v.20.1New Feature
Added greatCircleAngle function for sphere distance calculation in degrees
Added function greatCircleAngle which calculates the distance on a sphere in degrees. #8105 (alexey-milovidov)Why it matters
This feature provides a simple and precise method to compute the great-circle distance, which is the shortest distance over the earth's surface, enabling geographic and location-based calculations directly within ClickHouse queries.How to use it
Use thegreatCircleAngle function by providing latitude and longitude coordinates (in degrees) of two points. For example:SELECT greatCircleAngle(lat1, lon1, lat2, lon2) FROM tableThis will return the distance in degrees on the sphere between the two points.