rbc icon indicating copy to clipboard operation
rbc copied to clipboard

Input format for WKT for geometric types.

Open Raikao opened this issue 5 years ago • 3 comments

What would the correct syntax implementing a concatenation of strings as a UDF in OmniSci? It's not clear the relation between data types across python, numba and OmniSci when it comes to strings.

Raikao avatar Jan 29 '20 13:01 Raikao

Currently, OmniSci UDFs has support only for the following first-class types:

bool, int8, int16, int32, int64, float, double

and arrays of these types. So, string argument types and manipulations with strings are not supported within UDF definitions, ATM.

In general, the aim of RBC is to translate Python function definitions to LLVM IR form that is sent to OmniSci server where the LLVM IR is linked to the SQL Query Engine. For the translation, numba is used. The relation between the datatypes of Python, Numba, and OmniSci SQL is as follows:

  1. Python int and float map to SQL INTEGER and DOUBLE, respectively.
  2. numba int8, int16, int32, int64 map to SQL TINYINT, SMALLINT, INTEGER, BIGINT, respectively.
  3. Python/numba bool is mapped to SQL BOOLEAN.

pearu avatar Jan 29 '20 13:01 pearu

I see, so as long as there's no support from the OmniSci SQL engine to send strings through the LLVM, that functionality won't work.

Thanks for the explanation!

Raikao avatar Jan 30 '20 08:01 Raikao

I noticed that the OmniSci 5.1 release added support for UDF on geometric types. What is the input format to work with that? Have you had a chance to document this feature?

Raikao avatar Feb 10 '20 09:02 Raikao