Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org
Cc: kostja@tarantool.org
Subject: [tarantool-patches] [PATCH v3 0/4] Lua utf8 module
Date: Tue, 15 May 2018 22:54:04 +0300	[thread overview]
Message-ID: <cover.1526414017.git.v.shpilevoy@tarantool.org> (raw)

Branch: http://github.com/tarantool/tarantool/tree/gh-3290-lua-icu
Issue: https://github.com/tarantool/tarantool/issues/3290
Issue: https://github.com/tarantool/tarantool/issues/3385
Issue: https://github.com/tarantool/tarantool/issues/3081

Lua can not work with unicode - in Lua it is enterpreted as a binary. On such
string built-in upper/lower functions, '#' (length) and comparison operators do
not work. But Tarantool links with ICU and has comparators with collations, that
can solve the problems.

But there is another issue - string methods must be available before box.cfg,
so the ICU and collations must be built out of main 'box' static library. To do
this the collations are splitted in two submodules: core and box collations.
Core collation does not have any user defined things like name, id, owner - it
is just a comparator, wrapper for UCollator. Box collation is a wrapper for core
one, and has name, owner and id.

Core collations can be used before box.cfg, and have a cache built on
fingerprints. Fingeprint is a string that completely describes a collation
behavior. Core collations are never duplicated - if a collation is requested
with a fingerprint, that already exists in the cache, then the existing
collation is returned and referenced.

Vladislav Shpilevoy (4):
  error: introduce error rebulding API
  collation: split collation into core and box objects
  collation: introduce collation fingerprint
  lua: introduce utf8 built-in globaly visible module

 src/CMakeLists.txt           |   5 +-
 src/box/alter.cc             |  72 +++----
 src/box/coll.c               | 247 ++--------------------
 src/box/coll.h               |  59 ++----
 src/box/coll_cache.c         |  44 ++--
 src/box/coll_cache.h         |  17 +-
 src/box/coll_def.c           |  32 ---
 src/box/coll_def.h           |  86 +-------
 src/box/error.cc             |  27 +++
 src/box/error.h              |   5 +
 src/box/key_def.cc           |  22 +-
 src/box/key_def.h            |   5 +-
 src/box/lua/space.cc         |   8 +-
 src/box/schema.cc            |   8 +-
 src/box/tuple.c              |   4 +-
 src/box/tuple_compare.cc     |   5 +-
 src/box/tuple_hash.cc        |   4 +-
 src/coll.c                   | 352 +++++++++++++++++++++++++++++++
 src/coll.h                   | 113 ++++++++++
 src/coll_def.c               |  63 ++++++
 src/coll_def.h               | 115 +++++++++++
 src/diag.h                   |   9 +
 src/lua/init.c               |   3 +
 src/lua/utf8.c               | 479 +++++++++++++++++++++++++++++++++++++++++++
 src/lua/utf8.h               |  42 ++++
 src/main.cc                  |   3 +
 test/app-tap/string.test.lua | 163 ++++++++++++++-
 test/box/ddl.result          |  15 ++
 test/box/ddl.test.lua        |   8 +
 test/unit/CMakeLists.txt     |   2 +-
 test/unit/coll.cpp           |  47 ++++-
 test/unit/coll.result        |   5 +
 32 files changed, 1582 insertions(+), 487 deletions(-)
 create mode 100644 src/coll.c
 create mode 100644 src/coll.h
 create mode 100644 src/coll_def.c
 create mode 100644 src/coll_def.h
 create mode 100644 src/lua/utf8.c
 create mode 100644 src/lua/utf8.h

-- 
2.15.1 (Apple Git-101)

             reply	other threads:[~2018-05-15 19:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15 19:54 Vladislav Shpilevoy [this message]
2018-05-15 19:54 ` [tarantool-patches] [PATCH v3 1/4] error: introduce error rebulding API Vladislav Shpilevoy
2018-05-16 17:06   ` [tarantool-patches] " Vladislav Shpilevoy
2018-05-15 19:54 ` [tarantool-patches] [PATCH v3 2/4] collation: split collation into core and box objects Vladislav Shpilevoy
2018-05-16 17:07   ` [tarantool-patches] " Vladislav Shpilevoy
2018-05-16 17:17     ` Konstantin Osipov
2018-05-16 17:19       ` Vladislav Shpilevoy
2018-05-17 19:23   ` Vladislav Shpilevoy
2018-05-15 19:54 ` [tarantool-patches] [PATCH v3 3/4] collation: introduce collation fingerprint Vladislav Shpilevoy
2018-05-17 19:24   ` [tarantool-patches] " Vladislav Shpilevoy
2018-05-15 19:54 ` [tarantool-patches] [PATCH v3 4/4] lua: introduce utf8 built-in globaly visible module Vladislav Shpilevoy

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=cover.1526414017.git.v.shpilevoy@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] [PATCH v3 0/4] Lua utf8 module' \
    /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