Appendix

Data Types

typeexamples
Integer1, -1, 1234567
Double2.3, -3.56, 232.4
BoolTRUE, FALSE
Date2020-06-10
Time11:18:30
String“HStreamDB”

Keywords

keyworddescription
ABSabsolute value
ACOSarccosine
ACOSHinverse hyperbolic cosine
ANDlogical and operator
ASstream or field name alias
ASINarcsine
ASINHinverse hyperbolic sine
ATANarctangent
ATANHinverse hyperbolic tangent
AVGaverage function
BETWEENrange operator, used with AND
BYdo something by certain conditions, used with GROUP or ORDER
CEILrounds a number UPWARDS to the nearest integer
COScosine
COSHhyperbolic cosine
COUNTcount function
CREATEcreate a stream / connector
DATEprefix of date constant
DAYinterval unit
DROPdrop a stream
EXPexponent
FLOORrounds a number DOWNWARDS to the nearest integer
FORMATspecify the format of a stream
FROMspecify where to select data from
GROUPgroup values by certain conditions, used with BY
HAVINGfilter select values by a condition
HOPPINGhopping window
INNERjoining type, used with JOIN
INSERTinsert data into a stream, used with INTO
INTERVALprefix of interval constant
INTOinsert data into a stream, used with INSERT
IS_ARRAYto determine if the given value is an array of values
IS_BOOLto determine if the given value is a boolean
IS_DATEto determine if the given value is a date value
IS_FLOATto determine if the given value is a float
IS_INTto determine if the given value is an integer
IS_MAPto determine if the given value is a map of values
IS_NUMto determine if the given value is a number
IS_STRto determine if the given value is a string
IS_TIMEto determine if the given value is a time value
JOINfor joining two streams
LEFTjoining type, used with JOIN
LEFT_TRIMtrim spaces from the left end of a string
LOGlogarithm with base e
LOG10logarithm with base 10
LOG2logarithm with base 2
MAXmaximum function
MINminimum function
MINUTEinterval unit
MONTHinterval unit
NOTlogical not operator
ONspecify conditions, used with JOIN
ORlogical or operator
ORDERsort values by certain conditions, used with BY
OUTERjoining type, used with JOIN
REVERSEreverse a string
RIGHT_TRIMtrim spaces from the right end of a string
ROUNDrounds a number to the nearest integer
SECONDinterval unit
SELECTquery a stream
SESSIONsession window
SHOWshow something to stdout
SINsine
SINHhyperbolic sine
SQRTsquare root
STREAMspecify a stream, used with CREATE
STRLENget the length of a string
SUMsum function
TANtangent
TANHhyperbolic tangent
TIMEprefix of the time constant
TO_LOWERconvert a string to lowercase
TO_STRconvert a value to string
TO_UPPERconvert a string to uppercase
TRIMtrim spaces from both ends of a string
TUMBLINGtumbling window
VALUESspecify inserted data, used with INSERT INTO
WEEKinterval unit
WHEREfilter selected values by a condition
WITHspecify properties when creating a stream
WITHINspecify time window when joining two streams
YEARinterval unit

Operators

operatordescription
=equal to
<>not equal to
<less than
>greater than
<=less than or equal to
>=greater than or equal to
+addition
-subtraction
*multiplication
.access field of a stream
[]access item of a map or an array
ANDlogical and operator
ORlogical or operator
NOTlogical not operator
BETWEENrange operator

Scalar Functions

functiondescription
ABSabsolute value
ACOSarccosine
ACOSHinverse hyperbolic cosine
ASINarcsine
ASINHinverse hyperbolic sine
ATANarctangent
ATANHinverse hyperbolic tangent
CEILrounds a number UPWARDS to the nearest integer
COScosine
COSHhyperbolic cosine
EXPexponent
FLOORrounds a number DOWNWARDS to the nearest integer
IS_ARRAYto determine if the given value is an array of values
IS_BOOLto determine if the given value is a boolean
IS_DATEto determine if the given value is a date value
IS_FLOATto determine if the given value is a float
IS_INTto determine if the given value is an integer
IS_MAPto determine if the given value is a map of values
IS_NUMto determine if the given value is a number
IS_STRto determine if the given value is a string
IS_TIMEto determine if the given value is a time value
LEFT_TRIMtrim spaces from the left end of a string
LOGlogarithm with base e
LOG10logarithm with base 10
LOG2logarithm with base 2
REVERSEreverse a string
RIGHT_TRIMtrim spaces from the right end of a string
ROUNDrounds a number to the nearest integer
SINsine
SINHhyperbolic sine
SQRTsquare root
STRLENget the length of a string
TANtangent
TANHhyperbolic tangent
TO_LOWERconvert a string to lowercase
TO_STRconvert a value to string
TO_UPPERconvert a string to uppercase
TRIMtrim spaces from both ends of a string

Aggregate Functions

functiondescription
AVGaverage
COUNTcount
MAXmaximum
MINminimum
SUMsum