thanks Anoop for the information. I would like to change it to normal function.
So, for these variable-free functions, MySQL does support 'SELECT foo(); ' syntax sugar , which is nice. This may need some more work to re-arrange the function keyword category in the parser and make all variable-free functions together and make them in a new rule SELECT variable-free-expression Instead of only support UUID in this style. Not sure if only MySQL have this or this is common, will do some study. But I don't have a strong desire to do this at this point, can file a jira to track this. And at present, I would like to use normal syntax. Ming -----Original Message----- From: Anoop Sharma [mailto:[email protected]] Sent: Wednesday, February 07, 2018 11:49 PM To: [email protected] Subject: RE: uuid in Trafodion hi select uuid(); syntax was added a while back based on corresponding mysql syntax. this syntax was being used for some testing/poc at that time. It could be removed and changed to normal function usage. anoop -----Original Message----- From: Liu, Ming (Ming) [mailto:[email protected]] Sent: Wednesday, February 7, 2018 5:46 AM To: [email protected] Subject: uuid in Trafodion Hi, all, I was trying to allow UUID() to be used in DEFAULT clause in the column definition. I found uuid() is already supported but in a strange way to me. Now, one can use this query to get uuid: select uuid(); But cannot do: select uuid() from dual; uuid() is fixed syntax and can only be used as 'select uuid()'. I didn't find anywhere in the code base depend on this syntax. So I asked here if it is OK for me to change uuid() into a normal function? So it will make me easier to allow it in the column definition. Anyone know the story why UUID is defined in yacc as it is now? interactive_query_expression: | TOK_SELECT TOK_UUID '(' ')' If there is no special reason, I would like to change it into a misc_function. thanks, Ming
