Custom function
echo(avg) example
Assuming the type of avg is int and the value is 30, the result is:
countPlusOne(avg) example
Assuming the type of avg is []int and the value is
[1,2,3]
, the result is:[{"r1":4}]
SELECT countPlusOne(avg) as r1 FROM test;
accumulateWordCount(avg,sep) example
Assuming that the avg type is string and the value is
My name is Bob
, the sep type is string and the value is a space, the result is:[{"r1":4}]
SELECT accumulateWordCount(avg,sep) as r1 FROM test;
Image processing currently only supports the formats of png
and jpeg
The avg type is []byte.
SELECT resize(avg,width,height) as r1 FROM test;
thumbnail(avg,maxWidth, maxHeight) example
geohashEncode example
- Input:
{"lo" :131.036192,"la":-25.345457}
- Output:
{"geohashEncode":"qgmpvf18h86e"}
geohashEncodeInt example
- Input:
- Output:
{"geohashEncodeInt":12963433097944239317}
SELECT geohashEncodeInt(la,lo) FROM test
geohashDecode example
- Input:
{"hash" :"qgmpvf18h86e"}
- Output:
{"geohashDecode":{"Longitude":131.036192,"Latitude":-25.345457099999997}}
SELECT geohashDecode(hash) FROM test
geohashDecodeInt example
- Input:
{"hash" :12963433097944239317}
- Output:
{"geohashDecodeInt":{"Longitude":131.03618861,"Latitude":-25.345456300000002}}
SELECT geohashDecodeInt(hash) FROM test
- Input:
{"hash" :"qgmpvf18h86e"}
SELECT geohashBoundingBox(hash) FROM test
geohashBoundingBoxInt example
- Input:
{"hash" :12963433097944239317}
- Output:
geohashNeighbor example
- Input:
{"hash" :"qgmpvf18h86e","direction":"North"}
- Output:
{"geohashNeighbor":"qgmpvf18h86s"}
SELECT geohashNeighbor(hash,direction) FROM test
geohashNeighborInt example
- Input:
{"hash" :12963433097944239317,"direction":"North"}
- Output:
{"geohashNeighborInt":12963433097944240129}
SELECT geohashNeighborInt(hash,direction) FROM test
geohashNeighbors example
- Input:
{"hash" :12963433097944239317}
- Output:
{"geohashNeighbors":["qgmpvf18h86s","qgmpvf18h86u","qgmpvf18h86g","qgmpvf18h86f","qgmpvf18h86d","qgmpvf18h866","qgmpvf18h867","qgmpvf18h86k"]}
SELECT geohashNeighbors(hash) FROM test
geohashNeighborsInt example
- Input:
{"hash" :"qgmpvf18h86e","neber":"North"}
SELECT geohashNeighborsInt(hash) FROM test
LabelImage plugin
This is a sample plugin to demonstrate the usage of TensorFlowLite(tflite) model interpreter. The function receives a bytea input representing an image and produce the AI label of the image by running the tflite model.
Assuming the input is the byte array of peacock.jpg, the output will be “peacock”.