This article lists our prominent features supported in the current release:

Data Storage, Import & Export

  • A distributed storage system that provides high availability and redundancy.
  • Support for large data loading and unloading into/out of tables.
  • Exporting/ importing data from .csv files.
  • Decoupled storage and computing.
  • Internal metastore detection to provide information about the database

Integration

  • Connect Oxla to external data sources with JDBC.
  • Support PostgreSQL library.
  • We are fully integrated with Amazon S3 storage

Supported SQL

NameDescriptionExample
SELECT The SELECT statement is used to select data from a database. The data returned is stored in a result table called the result set.The following query will select all the columns from the Products table: SELECT * FROM Products;
INSERT INTOThe INSERT INTO query adds new rows to an existing table using a SELECT statement or explicitly stating input values.INSERT INTO distance_table (distance, unit) VALUES (2000, 'kilometers'), (1000, 'meters'), (5, 'miles');
DROPThe DROP statement is used to delete objects like an existing database or table. The following query will delete a table named testTB: DROP TABLE testTB;
The following query will delete a database named testTB: DROP DATABASE testDB;
CREATE TABLEThe CREATE TABLE statement is used to create a table in a database with a defined column and each column’s data type.CREATE TABLE book (bookID int, bookTitle text, bookCategory text, bookPublisher text, bookPages int;)
CREATE INDEXThe CREATE INDEX is used to create a single index on an empty table.
SHOW TABLESThe Show statements allow you to obtain information about existing tables.SHOW TABLES;
DESCRIBEThe Describe statement show columns within a table and tables within a database.DESCRIBE TABLE part;
DESCRIBE DATABASE;
SHOW NODESThe SHOW NODES returns the current state of the cluster.SHOW NODES;
SET/SHOWThe SET statement lets you set specific options, and the SHOW statement helps you see the current values in Oxla.SET extra_float_digits TO 2;``SHOW timezone;
COPY FROMThe COPY FROM statement copies the data from a file into a table.COPY table_name FROM 'file_path'
COPY TOThe COPY TO statement is used to export tables, specific columns, or results of select queries into .csv files.COPY salary TO '/path/to/exportsalary.csv';

SQL Syntax

Supported Clauses

NameDescriptionExample
FROMThe FROM clause can return a row set, a table, or a function from any ‘join’ statement.SELECT * FROM cars;
JOINA JOIN clause combines records from two or more tables based on a related column between those tables.SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate FROM Orders JOIN Customers ON Orders.CustomerID=Customers.CustomerID;
LEFT JOINThe LEFT JOIN joins two or more tables, returns all records from the left table, and matches records from the right table that fulfill the specified join condition. It will return null if there is no matching record from the right table.SELECT Customers.CustomerName, Orders.OrderID FROM Customers LEFT JOIN Orders ON Customers.CustomerID = Orders.CustomerID
RIGHT JOINThe RIGHT JOIN joins two or more tables and returns all records from the right table and the matched records from the left table that fulfill the specified join condition. It will return null if there is no matching record from the left table.SELECT Orders.OrderID, Employees.LastName, Employees.FirstName FROM Orders RIGHT JOIN Employees ON Orders.EmployeeID = Employees.EmployeeID
OUTER JOINThe OUTER JOIN joins and returns matched and unmatched values from either one or both tables.SELECT Customers.customerName, Orders.orderID FROM Customers OUTER JOIN Orders ON Customers.customerID=Orders.customerID
WHEREThe WHERE clause is used to filter records from a single table or by joining with multiple tables that fulfill the specified condition.SELECT * FROM Customers WHERE Country='France';
SELECT * FROM Customers WHERE CustomerID=1;
GROUP BYThe GROUP BY clause groups rows with the same values into summary rows.SELECT COUNT(CustomerID), Country FROM Customers GROUP BY Country;
HAVINGThe HAVING clause is used to filter data according to the conditions provided. The HAVING clause is usually executed with the GROUP BY clause.SELECT Department, sum(Salary) as Salary FROM employee GROUP BY department HAVING SUM(Salary) >= 50000;
ORDER BYThe ORDER BY sorts the rows of the result set from a SELECT statement.SELECT emp_name, emp_div FROM salaryemp ORDER BY emp_div;
LIMITThe LIMIT clause is an optional clause of the SELECT statement that constrains the number of rows the query returns.SELECT order_id, prod_name, prod_price FROM comporders ORDER BY order_id LIMIT 4;
OFFSETThe OFFSET is a clause that skips some records from the result set.SELECT * FROM oxlafunctions ORDER BY func_name LIMIT 5 OFFSET 2;
Set OperationsSet operations are used for comparisons, combinations, and distinctions among sets.It includes the following operations: UNION, EXCEPT, INTERSECT.

Supported Datatypes

Data TypesDefinitionFormat
BOOLBoolean value.True or False.
TEXTUTF8 encoded string with Unicode support.‘text’
DATEDate value.YYYY-MM-DD
TIMESTAMP WITHOUT TIME ZONETime and date values without a time zone.YYYY-MM-DD [HH:MM:SS[.SSSSSS]]
TIMESTAMP WITH TIME ZONEDate and time values, including the time zone information.YYYY-MM-DD HH:MM:SS.SSSSSS+TZ
TIMETime values without any date information.HH:MM:SS[.SSSSSS]
JSONA value in JSON standard format.variable_name JSON
INTERVALEncodes a span of timeyear-month (YYYY-MM); day-time (DD HH:MM:SS)
INT32-bit signed integerone or more digits “0” to “9”
BIGINT64-bit signed integerlarge numeric/decimal value
REAL32-bit floating point numberfloat(n)
DOUBLE PRECISION64-bit floating point numberdecimal(p, s)

Functions

Numeric functions

NameDescription
CEILThis function rounds up to the nearest positive or negative integer value greater than or equal to the argument.
ABSThis function returns the absolute value of an argument, regardless of whether it is positive or negative.
SQRTThis function returns the square root of its argument.
CBRTThe function calculates and returns the cube root of a given number.
RANDOMThis function returns a random number between 0 (inclusive) and 1 (exclusive).
FLOORThis function returns a number rounded down that is less than or equal to the specified argument.
LNThis function returns the exponential value of its argument.
SINThis function returns the trigonometric sine value of a specified angle in radians.
GREATESTThis function extracts the greatest or largest value from a set of values.
LEASTThis function returns the least or smallest value in a list of values.
ROUNDThis function rounds numbers to the nearest integer or to a specified number of decimal places.
EXPThis function returns the exponential value of a number specified in the argument.
LOGThe function returns the base-10 logarithm or logarithm of the specified base of a given number.
POWERThis function returns the value of a number raised to the power of another number specified in the arguments.
TO_CHAR from numberThis function formats a number into a string using a given format.

Aggregation functions

NameDescription
SUMCalculates the sum of values. Input must be numeric. If the input type is 32-bit, then the result will be 64-bit.
MINReturns the smallest value. Input must be numeric.
FOR_MINReturns a value corresponding to the minimal metric in the same row from a set of values.
MAXReturns the largest value. Input must be numeric
FOR_MAXReturns a value corresponding to the maximum metric in the same row from a set of values.
AVGCalculates the average of values. Input must be numeric. If the input type is 32-bit, then the result will be 64-bit.
COUNTCounts the number of rows.
BOOL_ANDFalse if at least one of aggregated rows is False. Input must be bool.
BOOL_ORTrue if at least one of aggregated rows is True. Input must be bool.

String functions

NameDescription
LENGTHReturns the number of characters in the string. The number of characters might be different from the byte length.
LOWERMakes string lowercase. It supports Unicode, so ß is changed into ss.
UPPERMakes string upper case. Supports Unicode.
STARTS_WITHIt returns true if the first argument starts with the second argument. E. g. STARTS_WITH(“abc,” “ab”) returns true.
ENDS_WITHIt returns true if the first argument ends with the second argument. E. g. STARTS_WITH(“abc,” “bc”) returns true.
CONCATConcatenates all inputs e. g. CONCAT(123, “abc”) returns “123abc”. Inputs might be of any type.
SUBSTRRetrieves substring. E. g. SUBSTR(“abcd”, 2) returns “cd”, SUBSTR(“abcd”, 2, 1) returns “c”.
STRPOSReturns position at which the second argument starts within the first argument or 0 if the first argument does not contain the second argument E. g. STRPOS(“abcd”, “ab”) return 2, STRPOS(“abcd”, “ac”) returns 0.
REGEXP_REPLACESubstitutes new text for substrings that match POSIX regular expression patterns.
REPLACEFinds and replaces a substring with a new one in a string.
POSITIONReturns the position of the first occurrence of a substring in a string.

Timestamp functions

NameDescription
CURRENT_TIMESTAMPReturns current timestamp.
FORMAT_TIMESTAMPFormats timestamp. Format string documentation: date. Example: FORMAT_TIMESTAMP('the date is: %F', CURRENT_TIMESTAMP()) would produce “the date is: 2022-12-19”
UNIX_SECONDSConverts the given timestamp to Unix timestamp in seconds.
UNIX_MILLISConverts the given timestamp to Unix timestamp in milliseconds.
UNIX_MICROSConverts the given timestamp to Unix timestamp in microseconds.
TIMESTAMP_SECONDSConverts Unix timestamp in seconds to timestamp.
TIMESTAMP_MILLISConverts Unix timestamp in milliseconds to timestamp.
TIMESTAMP_MICROSConverts Unix timestamp in microseconds to timestamp.
TIMESTAMP_TRUNC()Truncates a given timestamp to the nearest time parts. Supported time parts are YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND
EXTRACTExtracts are given time part from Timestamp. Supported time parts are YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND. e. g. EXTRACT(YEAR FROM TIMESTAMP ‘2020-10-15 10:15:23’) will return 2020.
TO_TIMESTAMPConverts a string into a timestamp based on the provided format.
DATE_TRUNCTruncates intervals or timestamps/time zones to a specified field.
TO_CHAR from timestampFormats a timestamp into a string using a given format.

Boolean function

NameDescription
IFThree arguments function. It expects that the first argument is of type BOOL, 2nd and 3rd has a matching type E. g. IF(2 < 5, “smaller,” “greater”) would produce “smaller.”

JSON functions

NameDescription
JSON_EXTRACT_PATHIt extracts JSON sub-object at the specified path.
JSON_EXTRACT_PATH_TEXTIt returns text referenced by a series of path elements in a JSON string or JSON body.
JSON_ARRAY_LENGTHIt returns the number of elements in the outer array of a JSON string or JSON body.
JSON_ARRAY_EXTRACTIt returns the JSON array as a set of JSON values. 

Other functions

NameDescription
CURRENT_SCHEMAIt returns the schema’s name first in the search path.
CURRENT_DATABASEIt returns the current database’s name.
COALESCEIt returns the first argument that is not null, while the remaining arguments from the first non-null argument are not evaluated.
NULLIFIt replaces a given value with null if it matches a specific criterion.
pg_total_relation_sizeIt retrieves the size of a table.
has_schema_privilegeIt checks whether the current user has specific privileges on a schema.
pg_get_exprIt retrieves the internal form of an individual expression, such as the default value for a column.
pg_typeofIt retrieves the data type of any given value.

Trigonometric functions

FunctionsDescription
acosIt calculates the inverse cosine of a given argument, where the output is expressed in radians.
acosdIt calculates the inverse cosine of a given argument, where the output is expressed in degrees.
asinIt calculates the inverse sine of a given argument, where the output is expressed in radians.
asindIt calculates the inverse sine of a given argument, where the output is expressed in degrees.
atanIt calculates the inverse tangent of a given argument, where the output is expressed in radians.
atandIt calculates the inverse tangent of a given argument, where the output is expressed in degrees.
atan2It calculates the inverse tangent of y/x, where the output is expressed in radians.
atan2dIt calculates the inverse tangent of y/x, where the output is expressed in degrees.
cosIt calculates the cosine of a given argument, where the argument is in radians.
cosdIt calculates the cosine of a given argument, where the argument is in degrees.
cotIt calculates the cotangent of a given argument, where the argument is in radians.
cotdIt calculates the cotangent of a given argument, where the argument is in degrees.
sinIt calculates the sine of a given argument, where the argument is in radians.
sindIt calculates the sine of a given argument, where the argument is in degrees.
tanIt calculates the tangent of a given argument, where the argument is in radians.
tandIt calculates the tangent of a given argument, where the argument is in degrees.
We still have a long road to go. We will keep you posted with our soon-to-be-released features to boost your experience. Stay tuned!