Basic Data Types

Data types are configured within the datatype object using the object type.

"settings": {
   "output_columns": [
        {
            "name": "a_string_column",
            "datatype": {
                "type": "string",
                .........

Basic Types

The following are supported.

Type

Indexed

Nullable

Description

Stored as

boolean

Yes (Default)

Yes

Converted to a uint8 prior to storage. The case-insensitive strings "false" or "0" get converted to 0. Any other non-0 value gets converted to 1.

uint8

double

No (can not be indexed).

Yes

A 64-bit floating-point number.

float64

int8

Yes (Default)

Yes

A signed 8-bit integer (-128 : 127).

int8

int32

Yes (Default)

Yes

A signed 32-bit integer (-2147483648 : 2147483647).

int32

int64

Yes (Default)

Yes

A signed 64-bit integer (-9223372036854775808 : 9223372036854775807).

int64

string

Yes (Default)

Yes

A variable-length string. Equivalent to VARCHAR or CLOB in other data systems.

string

uint8

Yes (Default)

Yes

An unsigned 8-bit integer (0 : 255).

uint8

uint32

Yes (Default)

Yes

An unsigned 32-bit integer (0 : 4294967295).

uint32

uint64

Yes (Default)

Yes

An unsigned 64-bit integer (0 : 18446744073709551615).

uint64

Nullables

Nullables in Hydrolix are not directly defined in the type and instead are defined by the default setting within the datatype object. By default all columns (except primary columns) are nullable, to make a field non-nullable a default is set forcing a value if one is not provided.

It should be noted that the default setting should be appropriate to the type, e.g. setting "" (empty string) for the type uint64 will cause unexpected and likely unwanted behaviours.

📘

Performance, Nulls and Strings

Hydrolix has seen performance improvements in query times if nulls are not required. For example setting a string default set as "" (empty string).

"settings": {
   "output_columns": [
     {
            "name": "nullable_string",
            "datatype": {
                "type": "string",
                "default": null
            }
        },
        {
            "name": "non_nullable_string",
            "datatype": {
                "type": "string",
                "default": ""
            }
        },
        {
            "name": "nullable_uint64",
            "datatype": {
                "type": "uint64",
                "default": null
            }
        },
        {
            "name": "non_nullable_string",
            "datatype": {
                "type": "uint64",
                "default": 0
            }
        },
     ..................

Indexing

Hydrolix has been specifically designed to index by default, without the traditional penalties found in older data platforms. It is therefore strongly suggested that the user should only turn off indexing of a column when absolutely necessary.

By default Hydrolix indexes all data types except doubles.

Indexing is turned (on and) off within the datatype descriptor in Output Columns.

"settings": {
   "output_columns": [
        {
            "name": "indexed_string_column",
            "datatype": {
                "type": "string",
                "index": true
            }
        },
        {
            "name": "not_indexed_string_column",
            "datatype": {
                "type": "string",
                "index": false
            }
        }
    ]
}

Did this page help you?