manticoresoftware / manticoresoftware/manticoresearch
SQL: UPDATE index SET field = other_field 1
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 12k
- Forks
- 642
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 47
Description
In an online shop, for prices we often use different currencies converted to a single currency for comparison. When the currency exchange rate changes, we want to run a statement as such (to update the EUR price converted to USD for all documents):
UPDATE index SET price_usd = price_in_original_currency * 1.25 WHERE currency = 'EUR';
But we get the error:
syntax error, unexpected identifier near 'price_in_original_currency * 1.25'
So the feature request is:
For an UPDATE...SET query, please allow using the a field as the new value (with simple arithmetic expressions).
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 UPDATE index SET query shown in the issue and trace how UPDATE...SET values are parsed and evaluated. Identify the relevant SQL parser and update execution entry points in the repository; done means field references and simple arithmetic expressions work for the demonstrated currency conversion without breaking existing UPDATE statements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100