You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2016/08/22 14:30:20 UTC
[jira] [Assigned] (IGNITE-3698) ODBC: Support LEN(string) function.
[ https://issues.apache.org/jira/browse/IGNITE-3698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vladimir Ozerov reassigned IGNITE-3698:
---------------------------------------
Assignee: Vladimir Ozerov (was: Andrew Mashenkov)
> ODBC: Support LEN(string) function.
> -----------------------------------
>
> Key: IGNITE-3698
> URL: https://issues.apache.org/jira/browse/IGNITE-3698
> Project: Ignite
> Issue Type: Task
> Components: odbc, SQL
> Affects Versions: 1.7
> Reporter: Vladimir Ozerov
> Assignee: Vladimir Ozerov
> Priority: Critical
> Fix For: 1.8
>
>
> *Problem*
> ODBC has standard function LEN(string). We do not support it at the moment because our H2 engine doesn't have this function. Instead, it has LENGTH function [1].
> We need to support LEN as well.
> *Solution*
> It is necessary to investigate how we can add "LEN" support. Most probably we should implement custom H2 function [2] inside "core" module. It can be placed in the package {{org.apache.ignite.internal.processors.query.h2.ext.func}} in the module "ignite-indexing".
> After that we should register it's alias inside the database, so that is LEN is correctly routed to that function.
> There is a chance that we can skip implementation of the new function and directly route LEN alias to built-in LENGTH function. This is the most preferred solution (if achievable). See {{org.h2.expression.Function}} class in H2 JAR. It shows an example on how funcs are registered and mapped to SQL literals. E.g., this is how {{LENGTH}} is mapped:
> {code}
> addFunction("LENGTH", LENGTH, 1, Value.LONG);
> {code}
> Something semantically similar can be found in {{GridSqlFunction}} and {{GridSqlFunctionType}} classes in Ignite.
> Please also make sure that proper tests are added.
> [1] http://www.h2database.com/html/functions.html#length
> [2] http://www.h2database.com/html/features.html#user_defined_functions
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)