Last active
January 3, 2023 07:49
-
-
Save KKcorps/feb3cf53b2fdcd2001fd1ab2d98e1655 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.apache.pinot.custom.function; | |
import com.github.davidmoten.geo.GeoHash; | |
import org.apache.pinot.spi.annotations.ScalarFunction; | |
public class CustomScalarFunctions { | |
@ScalarFunction(names = {"encode_geohash"}) | |
public static String latLngToGeo(Double latitude, Double longitude, Integer geoLength) { | |
return GeoHash.encodeHash(latitude, longitude, geoLength); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment