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
Fixes gh-2189 Field type UUID is now available in SQL #2201
Conversation
@pgulutzan thank you! Please keep this PR open, we'll translate it right away and then merge both the doc updates and the translation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
d132cf4
to
8e5302f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pgulutzan, thanks for the changes, LGTM, except the one question: I found no changes related to SCALAR
comparison order mentioned in #2151. Is there a place, where this order is described?
@@ -485,8 +485,9 @@ Data types may also appear in :ref:`CAST <sql_function_cast>` functions. | |||
column7 STRING, column8 STRING COLLATE "unicode", | |||
column9 TEXT, columna TEXT COLLATE "unicode_sv_s1", | |||
columnb VARCHAR(0), columnc VARCHAR(100000) COLLATE "binary", | |||
columnd VARBINARY, | |||
columne SCALAR, columnf SCALAR COLLATE "unicode_uk_s2"); | |||
columnd UUID, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: why is this field added as a non-last attribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not added as a non-last attribute. The text that I see in the changed file looks like this:
-- with all possible data types and aliases
CREATE TABLE t
(column1 BOOLEAN, column2 BOOL,
column3 INT PRIMARY KEY, column4 INTEGER,
column5 DOUBLE,
column6 NUMBER,
column7 STRING, column8 STRING COLLATE "unicode",
column9 TEXT, columna TEXT COLLATE "unicode_sv_s1",
columnb VARCHAR(0), columnc VARCHAR(100000) COLLATE "binary",
columnd UUID,
columne VARBINARY,
columnf SCALAR, columng SCALAR COLLATE "unicode_uk_s2");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I see. And the question is why did you change collumnd
type to UUID, instead of making the new attribute collumng
of UUID type? Anyway, I am totally OK with this change, just trying to get your point regarding it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I misunderstood your question, sorry. For this example we can put the columns in any order. I was not trying to make a point. I am wondering now: is there any way that putting columns in a different order affects performance? But, regardless what the answer for that is, it won't matter for this example.
|
||
Return a Universal Unique Identifier, data type UUID. | ||
Optionally one can specify a version number; however, at this time the | ||
only allowed version is 4, which is the default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: IMHO, "supported" fits much better here than "allowed" does. Feel free to ignore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize that if I say UUID(3) I get an error message that includes the word "supported".
However, the fact that I get an error message means that UUID(3) is not allowed.
If I had not gotten an error message, that would mean UUID(3) is allowed but meaningless
and probably will have no effect -- that would be my idea of "not supported". Understandable?
@igormunkin: your question shows that I was careless when looking at #2151, I did not see that it was not marked as an SQL issue. |
No problem. I was simply confused with the message, that #2151 will be also resolved in scope of this PR.
Agree.
Agree.
IMHO, it would be better to resolve #2151 in a separate PR, since it relates to SCALAR and UUID for both language runtimes. I also summon @ImeevMA here as an author of the ticket and the patch. |
@igormunkin, I think that you are right. If @NickVolynkin agrees, let us say: |
e5c00d2
to
a02a7f3
Compare
@pgulutzan and @alexandra-mara, thank you for all the good work. I've just merged the PR. I made a mistake with the first merge and had to re-merge it.. twice. As a result, the commit is made under my name, but I've explicitly stated the authorship of the original text and the translation. I apologize for the inconvenience this might have caused. |
@NickVolynkin, for me that is the opposite of inconvenient, since I guess it means we have now finished with this pull request and I will be able to close all the related issues assigned to me -- except issue#2151, since as discussed with @igormunkin above I have a few more words. See issue#2235 Fixes gh-2151 UUID is now part of SCALAR. |
In fact the intent is to fix gh-2189 and other issues that are duplicates or closely related because they're about sql + uuid:
gh-2151 gh-2176 gh-2177 gh-2190.
Also a few punctuation errors are fixed.
I added a label 2.9.1 -- this appears to be the relevant version but there are no release notes for it yet.
Some issues related to sql + uuid are being discussed in tarantool/tarantool#6164 comments but I don't expect them to affect documentation immediately.