Data Types for User-Defined Data Pipeline Functions
This description provides the Ocient® packages that support the functionality for user-defined data pipeline functions.
Classes
com.ocient.streaming.schema.OcientColumnType
The class that enumerates all defined column types in the Ocient System.
com.ocient.streaming.schema.OcientColumnTypeArguments
The class that describes arguments of a column type. Not all column types require arguments.
com.ocient.streaming.schema.OcientColumnTypeArguments.Decimal
A subclass of OcientColumnTypeArguments that includes information for TYPE_DECIMAL.
com.ocient.streaming.schema.OcientColumnTypeArguments.Hash
A subclass of OcientColumnTypeArguments that includes information for TYPE_HASH.
com.ocient.streaming.schema.OcientColumnTypeArguments.Array
A subclass of OcientColumnTypeArguments that includes information for TYPE_ARRAY.
com.ocient.streaming.schema.OcientColumnTypeArguments.TopLevelTuple
A subclass of tuple that includes information for top-level tuples.
com.ocient.streaming.schema.OcientColumn
Represents an Ocient column with information parsed from metadata of the Ocient System.
com.ocient.streaming.data.types.gis.Coordinate
Represents a two-dimensional cartesian coordinate.
com.ocient.streaming.data.types.gis.STPoint
Represents a two-dimensional cartesian coordinate.
com.ocient.streaming.data.types.gis.STLinestring
Geometric type that is composed of a sequence of N points.
com.ocient.streaming.data.types.gis.STPolygon
Geometric type composed of N closed linestrings.
com.ocient.streaming.data.types.Timestamp
Timestamp represented as nanoseconds from the Unix® epoch.
com.ocient.streaming.data.types.Time
Time that is represented as nanoseconds from midnight (00:00:00).
com.ocient.streaming.data.types.Decimal
A class representing a decimal number with binary-coded decimal (BCD) storage, supporting specified precision and scale.
precision— The precision (total number of digits) of the decimal.scale— The scale (number of digits after the decimal point) of the decimal. | |public static Decimal|fromBigDecimal(java.math.BigDecimal d, byte precision, byte scale)
Creates aDecimalobject from aBigDecimal, ensuring compatibility with the specified precision and scale.
*d— TheBigDecimalto convert.precision— The precision (total number of digits) of the decimal.scale— The scale (number of digits after the decimal point) of the decimal. | |public static Decimal|fromDouble(double d, byte precision, byte scale)
Creates aDecimalobject from a double value with the specified precision and scale.
*d— The double to convert.precision— The precision (total number of digits) of the decimal.scale— The scale (number of digits after the decimal point) of the decimal. | |public String|toString()— Returns theDecimalstring representation of thisDecimal. | |public long|asLong()— Converts thisDecimalobject to a long, truncating any fractional part. | |public double|asDouble()— Converts thisDecimalobject to a double, preserving the full value including the fractional part. | |public byte[]|bcd()— Returns the BCD representation of thisDecimalobject. | |public byte[]|getFullFormat()— Returns the full format representation, including precision and scale bytes followed by the BCD data padded toMAX_PRECISION. | |public int|precision()— Returns the precision of thisDecimalobject. | |public int|scale()— Returns the scale of thisDecimalobject. |
com.ocient.streaming.data.types.OcientTuple
A class representing a tuple with a defined schema of column types and associated values. Supports fixed-length and variable-length elements.
value— The value to set must match the column type at the index. | |public void|set(List<Object> values)
Sets or resets all values in the tuple from the provided list.
*values— The list of values to set must match the schema size and types. | |public String|toString()— Returns a string representation of this tuple, including its schema and values (e.g.,"TUPLE<INT,DOUBLE>(1,2.0)"). | |public List<Object>|get()— Returns the list of values in this tuple, in order. | |public List<OcientColumnType>|getTypes()— Returns the list of column types defining the schema of this tuple, in order. | |public List<OcientColumnTypeArguments>|getTypeArgs()— Returns the list of type arguments corresponding to the column types of this tuple, in order. |
typeArgs— The list of type arguments corresponding to each column type. |

