HOW TO: WhereOS SQL Function Documentation – Comprehensive Guide to SparkSQL & Hive Functions

Introduction

This is a list of built-in functions of WhereOS, based on Spark & Hive functions and 3rd party libraries. More functions can be added to WhereOS via Python or R bindings or as Java & Scala UDF (user-defined function), UDAF (user-defined aggregation function) and UDTF (user-defined table generating function) extensions. Custom libraries can be added on via Settings-page or installed from WhereOS Store

Function: !

! expr – Logical not.
Class: org.apache.spark.sql.catalyst.expressions.Not

Function: %

expr1 % expr2 – Returns the remainder after `expr1`/`expr2`.
Class: org.apache.spark.sql.catalyst.expressions.Remainder

Function: &

expr1 & expr2 – Returns the result of bitwise AND of `expr1` and `expr2`.
Class: org.apache.spark.sql.catalyst.expressions.BitwiseAnd

Function: *

expr1 * expr2 – Returns `expr1`*`expr2`.
Class: org.apache.spark.sql.catalyst.expressions.Multiply

Function: +

expr1 + expr2 – Returns `expr1`+`expr2`.
Class: org.apache.spark.sql.catalyst.expressions.Add

Function: –

expr1 – expr2 – Returns `expr1`-`expr2`.
Class: org.apache.spark.sql.catalyst.expressions.Subtract

Function: /

expr1 / expr2 – Returns `expr1`/`expr2`. It always performs floating point division.
Class: org.apache.spark.sql.catalyst.expressions.Divide

Function: <

expr1 < expr2 - Returns true if `expr1` is less than `expr2`.
Class: org.apache.spark.sql.catalyst.expressions.LessThan

Function: <=

expr1 <= expr2 - Returns true if `expr1` is less than or equal to `expr2`.
Class: org.apache.spark.sql.catalyst.expressions.LessThanOrEqual

expr1 <=> expr2 – Returns same result as the EQUAL(=) operator for non-null operands, but returns true if both are null, false if one of the them is null.

Class: org.apache.spark.sql.catalyst.expressions.EqualNullSafe

Function: =

expr1 = expr2 – Returns true if `expr1` equals `expr2`, or false otherwise.
Class: org.apache.spark.sql.catalyst.expressions.EqualTo

Function: ==

expr1 == expr2 – Returns true if `expr1` equals `expr2`, or false otherwise.
Class: org.apache.spark.sql.catalyst.expressions.EqualTo

expr1 > expr2 – Returns true if `expr1` is greater than `expr2`.