[tarantool-patches] Re: [PATCH v2 1/1] sql: ANSI aliases for LENGTH()

n.pettik korablev at tarantool.org
Mon Jul 8 16:12:09 MSK 2019


> src/box/sql/func.c          |  3 +++
> test/sql-tap/func3.test.lua | 23 ++++++++++++++++++++++-
> 2 files changed, 25 insertions(+), 1 deletion(-)
> 
> diff --git a/src/box/sql/func.c b/src/box/sql/func.c
> index 761a3ab..98cad51 100644
> --- a/src/box/sql/func.c
> +++ b/src/box/sql/func.c
> @@ -1893,6 +1893,9 @@ sqlRegisterBuiltinFunctions(void)
> 			  FIELD_TYPE_STRING),
> 		FUNCTION2(length, 1, 0, 0, lengthFunc, SQL_FUNC_LENGTH,
> 			  FIELD_TYPE_INTEGER),
> +		FUNCTION(char_length, 1, 0, 0, lengthFunc, FIELD_TYPE_INTEGER),
> +		FUNCTION(character_length, 1, 0, 0, lengthFunc,
> +			 FIELD_TYPE_INTEGER),

Please, verify usage of SQL_FUNC_LEGTH flag. I see that it serves
to provide certain optimisation, but it is likely to be inapplicable to
the current SQL implementation. Hence, I guess we should remove
it now and create an issue to resurrect it in the future (if it is possible at all).

lgtm



More information about the Tarantool-patches mailing list