Tarantool development patches archive
 help / color / mirror / Atom feed
From: Kirill Shcherbatov <kshcherbatov@tarantool.org>
To: tarantool-patches@freelists.org, "n.pettik" <korablev@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v4 3/4] sql: get rid of FuncDef function hash
Date: Fri, 23 Aug 2019 18:02:15 +0300	[thread overview]
Message-ID: <ff2bb106-3bda-baea-6589-83ba463d4dc3@tarantool.org> (raw)
In-Reply-To: <17C6E71F-24DF-476D-B5FA-430AF34DC84D@tarantool.org>

>> +#define SQL_FUNC_MAX   0x2000
> 
> Nit: extra diff.
Fixed.
>> +	/**
>> +	 * A VDBE-memory-compatible call method.
>> +	 * SQL built-ins don't use func base class "call"
>> +	 * method to provide a best performance for SQL requests.
>> +	 * Access checks are redundant, because all SQL built-ins
>> +	 * are predefined and are executed on SQL privilege level.
> 
> Which doesn’t exist yet… I asked you to document or fix it.
> Comment in source code is OK, but it should be present in
> documentation as well.
A new DocBot request in the commit message:

    @TarantoolBot document
    Title: SQL builtins priveleges
    
    All SQL built-ins are executed on SQL privilege level that is
    undefined yet.

>> +						 ">= 2", nFarg);
> 
> -> “more than one”/“at least two”
> 
> What is more, you can move introduction of ER_FUNC_WRONG_…
> to a separate auxiliary patch.
> Nit: “at least one”
Done. As an auxiliary patch.


> Nit: personally I’d not skip members and fill in them allActually I don't like it, but I don't mind so I've implemented it.

>> +	/* Some builtins are not implemented yet. */
> 
> Please, left comment describing why we really do need this check.
> I mean the fact that it disallows user to create random built-in functions.
	/*
	 * All SQL built-in(s) (stubs) are defined in a snapshot.
	 * Implementation-specific metadata is defined in
	 * sql_builtins list. When a definition were not found
	 * above, the function name is invalid, i.e. it is
	 * not built-in function.
	 */
		    "in SQL", nId, zId));
>> 				} else {
> 
> Let’s avoid call of sql_func_by_signature(). Consider refactoring:
> etc
Okey, implemented.

> Didn’t forget check that user can’t create manually built-ins?
No, I didn't. There is corresponding test in the following commit.

  parent reply	other threads:[~2019-08-23 15:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-21 15:28 [tarantool-patches] [PATCH v4 0/4] sql: uniform SQL and Lua functions subsystem Kirill Shcherbatov
2019-08-21 15:28 ` [tarantool-patches] [PATCH v4 1/4] sql: rename sql_vdbe_mem_alloc_region helper Kirill Shcherbatov
2019-08-22 13:04   ` [tarantool-patches] " n.pettik
2019-08-23 15:02     ` Kirill Shcherbatov
2019-08-21 15:28 ` [tarantool-patches] [PATCH v4 2/4] sql: replace flag MINMAX with flags MIN and MAX Kirill Shcherbatov
2019-08-22 13:30   ` [tarantool-patches] " n.pettik
2019-08-21 15:28 ` [tarantool-patches] [PATCH v4 3/4] sql: get rid of FuncDef function hash Kirill Shcherbatov
2019-08-22 14:37   ` [tarantool-patches] " n.pettik
2019-08-23 15:02     ` [tarantool-patches] [PATCH v4 4/5] " Kirill Shcherbatov
2019-08-23 15:02     ` [tarantool-patches] [PATCH v4 3/5] sql: remove name overloading for SQL builtins Kirill Shcherbatov
2019-08-28 15:05       ` [tarantool-patches] " Nikita Pettik
2019-08-23 15:02     ` Kirill Shcherbatov [this message]
2019-08-21 15:28 ` [tarantool-patches] [PATCH v4 4/4] sql: support user-defined functions in SQL Kirill Shcherbatov
2019-08-22 15:23   ` [tarantool-patches] " n.pettik
2019-08-23 15:02     ` Kirill Shcherbatov
2019-08-29 15:09 ` [tarantool-patches] Re: [PATCH v4 0/4] sql: uniform SQL and Lua functions subsystem Nikita Pettik
2019-08-29 17:12 ` Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff2bb106-3bda-baea-6589-83ba463d4dc3@tarantool.org \
    --to=kshcherbatov@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v4 3/4] sql: get rid of FuncDef function hash' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox