ES|QL type conversion functions
ES|QL supports implicit casting from string literals to certain data types. Refer to implicit casting for details.
ES|QL supports these type conversion functions:
TO_AGGREGATE_METRIC_DOUBLEConverts a numeric value to an aggregate_metric_double.
TO_BOOLEANConverts a value to a boolean.
TO_CARTESIANPOINTConverts a value to a cartesian_point.
TO_CARTESIANSHAPEConverts a value to a cartesian_shape.
TO_COUNTERConverts a numeric value to its counter type equivalent.
TO_DATEPERIODConverts a value to a date_period.
TO_DATETIMEConverts a value to a date.
TO_DATE_NANOSConverts a value to a nanosecond-resolution date.
TO_DEGREESConverts a number in radians to degrees.
TO_DENSE_VECTORConverts numbers or a hexadecimal string to a dense_vector.
TO_DOUBLEConverts a value to a double.
TO_EXPONENTIAL_HISTOGRAMConverts histogram-like values to an exponential histogram.
TO_GAUGEConverts a counter value to its gauge numeric equivalent.
TO_GEOHASHConverts a value to a geohash.
TO_GEOHEXConverts a value to a geohex.
TO_GEOPOINTConverts a value to a geo_point.
TO_GEOSHAPEConverts a value to a geo_shape.
TO_GEOTILEConverts a value to a geotile.
TO_INTEGERConverts a value to an integer.
TO_IPConverts a string to an IP value.
TO_LONGConverts a value to a long.
TO_RADIANSConverts a number in degrees to radians.
TO_STRINGConverts a value to a string.
TO_TDIGESTConverts an untyped histogram to a TDigest.
TO_TIMEDURATIONConverts a value to a time_duration.
TO_UNSIGNED_LONGConverts a value to an unsigned long.
TO_VERSIONConverts a string to a version value.