tarantool / tarantool/crud

Update operation convert is broken for splice

Open
#397 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Lua
Stars
43
Forks
17
Avg merge
28m
Merged PRs (30d)
2

Description

tarantool> box.info.version
---
- 1.10.15-0-ge14d0b4
...

tarantool> crud.update('customers', 1, {{":", "name", 2, 3, "a"}})
---
- null
- line: 177
  class_name: UpdateError
  err: 'Failed to update: Unknown UPDATE operation'
  file: ./crud/update.lua
  str: 'UpdateError: Failed to update: Unknown UPDATE operation'
...

yet it is actually supported by Tarantool 1.10.15. The reason is that the operation is converted to invalid [[":",3,2]] operation:
https://github.com/tarantool/crud/blob/48f801c0257f8c948fc8ffaf8992300f814f5b97/crud/common/utils.lua#L776-L778

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The conversion is in crud/common/utils.lua around lines 776-778; start there and trace how the splice operation is transformed. Confirm that the shown crud.update call produces a valid Tarantool update operation and succeeds on the reported version, then check whether the repository provides a focused regression test location.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.