From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: "n.pettik" <korablev@tarantool.org>, tarantool-patches@freelists.org Subject: [tarantool-patches] Re: [PATCH 3/9] sql: use msgpack types instead of custom ones Date: Mon, 22 Apr 2019 21:02:21 +0300 [thread overview] Message-ID: <a612e3c4-35f1-7b1a-cf60-4b495dcd6dd5@tarantool.org> (raw) In-Reply-To: <BD1C58E8-5F3B-4874-A35E-B2A71E006460@tarantool.org> Thanks for the fixes! >>> @@ -139,15 +139,15 @@ lengthFunc(sql_context * context, int argc, sql_value ** argv) >>> >>> assert(argc == 1); >>> UNUSED_PARAMETER(argc); >>> - switch (sql_value_type(argv[0])) { >>> - case SQL_BLOB: >>> - case SQL_INTEGER: >>> - case SQL_FLOAT:{ >>> + switch (sql_value_mp_type(argv[0])) { >>> + case MP_BIN: >>> + case MP_INT: >>> + case MP_DOUBLE:{ >> >> 4. Probably you could fix part of this: >> https://github.com/tarantool/tarantool/issues/4159 in scope of >> this commit, alongside. > > THis patch provides straightforward refactoring, I don’t want > to involve here non-trivial changes. Yes, you are right, it is not worth doing here. > diff --git a/src/box/sql/date.c b/src/box/sql/date.c > index 5f5272ea3..1c7a5ad2d 100644 > --- a/src/box/sql/date.c > +++ b/src/box/sql/date.c > @@ -932,12 +932,12 @@ isDate(sql_context * context, int argc, sql_value ** argv, DateTime * p) > { > int i, n; > const unsigned char *z; > - int eType; > + enum mp_type eType; > memset(p, 0, sizeof(*p)); > if (argc == 0) { > return setDateTimeToCurrent(context, p); > } > - if ((eType = sql_value_type(argv[0])) == SQL_FLOAT > + if ((eType = sql_value_type(argv[0])) == MP_DOUBLE > || eType == SQL_INTEGER) { SQL_INTEGER is removed already. Please, replace with MP_INT.
next prev parent reply other threads:[~2019-04-22 18:02 UTC|newest] Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-14 15:03 [tarantool-patches] [PATCH 0/9] Introduce type BOOLEAN in SQL Nikita Pettik 2019-04-14 15:03 ` [tarantool-patches] [PATCH 1/9] sql: refactor mem_apply_numeric_type() Nikita Pettik 2019-04-14 15:04 ` [tarantool-patches] [PATCH 2/9] sql: disallow text values participate in sum() aggregate Nikita Pettik 2019-04-16 14:12 ` [tarantool-patches] " Vladislav Shpilevoy 2019-04-18 17:54 ` n.pettik 2019-04-22 18:02 ` Vladislav Shpilevoy 2019-04-23 19:58 ` n.pettik 2019-04-14 15:04 ` [tarantool-patches] [PATCH 3/9] sql: use msgpack types instead of custom ones Nikita Pettik 2019-04-16 14:12 ` [tarantool-patches] " Vladislav Shpilevoy 2019-04-18 17:54 ` n.pettik 2019-04-22 18:02 ` Vladislav Shpilevoy [this message] 2019-04-23 19:58 ` n.pettik 2019-04-14 15:04 ` [tarantool-patches] [PATCH 4/9] sql: introduce type boolean Nikita Pettik 2019-04-16 14:12 ` [tarantool-patches] " Vladislav Shpilevoy 2019-04-18 17:54 ` n.pettik 2019-04-22 18:02 ` Vladislav Shpilevoy 2019-04-23 19:58 ` n.pettik 2019-04-23 21:06 ` Vladislav Shpilevoy 2019-04-14 15:04 ` [tarantool-patches] [PATCH 5/9] sql: improve type determination for column meta Nikita Pettik 2019-04-16 14:12 ` [tarantool-patches] " Vladislav Shpilevoy 2019-04-18 17:54 ` n.pettik 2019-04-22 18:02 ` Vladislav Shpilevoy 2019-04-23 19:58 ` n.pettik 2019-04-14 15:04 ` [tarantool-patches] [PATCH 6/9] sql: make comparison predicate return boolean Nikita Pettik 2019-04-16 14:12 ` [tarantool-patches] " Vladislav Shpilevoy 2019-04-18 17:54 ` n.pettik 2019-04-14 15:04 ` [tarantool-patches] [PATCH 7/9] sql: make predicates accept and " Nikita Pettik 2019-04-16 14:12 ` [tarantool-patches] " Vladislav Shpilevoy 2019-04-18 17:55 ` n.pettik 2019-04-14 15:04 ` [tarantool-patches] [PATCH 9/9] sql: make <search condition> accept only boolean Nikita Pettik 2019-04-16 14:12 ` [tarantool-patches] " Vladislav Shpilevoy 2019-04-18 17:55 ` n.pettik 2019-04-22 18:02 ` Vladislav Shpilevoy 2019-04-23 19:59 ` n.pettik 2019-04-23 21:06 ` Vladislav Shpilevoy 2019-04-23 22:01 ` n.pettik [not found] ` <b2a84f129c2343d3da3311469cbb7b20488a21c2.1555252410.git.korablev@tarantool.org> 2019-04-16 14:12 ` [tarantool-patches] Re: [PATCH 8/9] sql: make LIKE predicate return boolean result Vladislav Shpilevoy 2019-04-18 17:55 ` n.pettik 2019-04-22 18:02 ` Vladislav Shpilevoy 2019-04-23 19:58 ` n.pettik 2019-04-24 10:28 ` [tarantool-patches] Re: [PATCH 0/9] Introduce type BOOLEAN in SQL Vladislav Shpilevoy 2019-04-25 8:46 ` 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=a612e3c4-35f1-7b1a-cf60-4b495dcd6dd5@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=korablev@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH 3/9] sql: use msgpack types instead of custom ones' \ /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