tarantool / tarantool/tarantool
scalar-field format rejects datetime.interval type
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 3.7k
- Forks
- 419
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 88
Description
Bug description
Version: Tarantool 3.7.0-entrypoint-55-ga755e0ed38
Actual behavior
datetimeasscalaris accepted, butintervalasscalaris rejected
dt = require('datetime')
s = box.schema.space.create('s', {format = {{'id', 'unsigned'}, {'d', 'scalar'}}, temporary = true})
---
...
s:create_index('ii')
...
s:insert({1, dt.new()})
---
- [1, '1970-01-01T00:00:00Z']
...
s:insert({2, dt.interval.new()})
---
- error: 'Tuple field 2 (d) type does not match one required by operation: expected
scalar, got extension'
...
-
datetimeandintervalis missed in the docu in enumerations ofscalarandanytypes: https://www.tarantool.io/en/doc/latest/platform/ddl_dml/value_store/#scalar -
It seems
box.schema.space.create()and similar format tests misseddatetimeandintervaltypes.
Expected behavior
-
intervaltype must be accepted asscalar. -
docu fixed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the scalar format behavior with box.schema.space.create() and the datetime interval example from the report, then inspect the related format tests. Confirm that interval is accepted as scalar, add coverage for datetime and interval where the report says tests are missing, and update the scalar and any documentation page to list both types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- databases, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100