Skip to content

[2pt] QUOTE() and DOUBLE argument #2298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TarantoolBot opened this issue Aug 19, 2021 · 2 comments · Fixed by #2350
Closed

[2pt] QUOTE() and DOUBLE argument #2298

TarantoolBot opened this issue Aug 19, 2021 · 2 comments · Fixed by #2350
Assignees
Labels
behavior change [nature] Сhange in existing behavior reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality sql [location] SQL manual

Comments

@TarantoolBot
Copy link
Collaborator

TarantoolBot commented Aug 19, 2021

Update description of the QUOTE() function

Product: Tarantool
Version: 2.10.0-beta1
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_sql/sql_statements_and_clauses/#quote
SME: @ ImeevMA

Details

After this patch function QUOTE() will return argument in case it
receives DOUBLE value as an argument. The same for all other numeric
types. In case it was given value of non-numeric type, it will return
string representation of the argument.

Requested by @ImeevMA in tarantool/tarantool@62d622f.

Can be done via #2296


Resolved by #2350

@xuniq xuniq added this to the Estimate [@xuniq] milestone Sep 7, 2021
@xuniq xuniq added reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality behavior change [nature] Сhange in existing behavior labels Sep 8, 2021
@xuniq xuniq changed the title QUOTE() and DOUBLE argument [1pt?] QUOTE() and DOUBLE argument Sep 8, 2021
@veod32 veod32 added sql [location] SQL manual 2021 Q3 labels Sep 8, 2021
@veod32 veod32 changed the title [1pt?] QUOTE() and DOUBLE argument [2pt] QUOTE() and DOUBLE argument Sep 8, 2021
@veod32 veod32 removed this from the Estimate [@xuniq] milestone Sep 8, 2021
@pgulutzan
Copy link
Contributor

I think I understand.
quote(1.1) returned '1.1' in version 2.8, quote(1.1) returns 1.1 in 2.10.
quote(any number type) returns the same value as the input and the same type.
quote(false) and quote(uuid()) and quote(x'00') return the same value as the input and not the same type
(it as like saying cast(false as string) etc.)
I agree that this can be done as part of 2296 which I have assigned to myself.

@ImeevMA
Copy link

ImeevMA commented Sep 25, 2021

Actually, I plan to make QUOTE() accept only STRING argument. Or drop this function. Not sure if either of this will be accepted. I will write a document.

@NickVolynkin NickVolynkin linked a pull request Nov 8, 2021 that will close this issue
patiencedaur added a commit that referenced this issue Dec 22, 2021
Resolves #2295, #2296, #2298

Written by Peter Gulutzan
Translated by Alexandra Mirzuitova, translation reviewed by Patience Daur

Co-authored-by: Peter Gulutzan <[email protected]>
Co-authored-by: Alexandra Mirzuitova <[email protected]>
Co-authored-by: Patience Daur <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behavior change [nature] Сhange in existing behavior reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality sql [location] SQL manual
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants