Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH v3 0/4] Lua utf8 module
@ 2018-05-15 19:54 Vladislav Shpilevoy
  2018-05-15 19:54 ` [tarantool-patches] [PATCH v3 1/4] error: introduce error rebulding API Vladislav Shpilevoy
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Vladislav Shpilevoy @ 2018-05-15 19:54 UTC (permalink / raw)
  To: tarantool-patches; +Cc: kostja

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)

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-05-17 19:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-15 19:54 [tarantool-patches] [PATCH v3 0/4] Lua utf8 module Vladislav Shpilevoy
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

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