-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
evalengine: Support all built-in MySQL functions #9647
Comments
Hii @vmg, I would like to contribute to this project on GSoC 2022. Can you guide me on how should I start with this project? |
Hi @kaveeshadinamidu! There's not much you can do to get started right now since our GSoC application hasn't been approved yet. I would advise you to brush up on your Go skills meanwhile! |
HI @vmg I am looking to contribute to this project in GSOC'22 , btw is the application approved ? |
Hi @Jassi10000! We won't know if the project has been accepted until March 7th, the official date when Google will announce the accepted organizations. As for important things to learn: I think it's important to have a solid grasp of SQL (and the particular SQL syntax that MySQL uses). For Go, just basic knowledge of the language will suffice. |
I hope it gets accepted 😊, and thanks @vmg for telling about the level of knowledge I should have |
Hey everyone! We've seen a lot of interest from potential students about this GSoC proposal. This includes many candidates opening PRs to implement some of the functionality of the project ahead of time. Because of this interest, I wanted to take a moment to write some contribution guidelines, so nobody wastes their time.
If you really think that opening an introductory PR will help you understand the project better, please keep the following in mind:
Let me wrap up by thanking you all, and any further prospective students, for the interest you've shown in our project, and emphasize that unless you have a very keen interest on implementing and submitting a built-in function before the project starts, your time will be better spent reviewing the project and preparing a good, comprehensive application with proper English, instead of opening incomplete PRs. |
The Cloud Native Computing Foundation has been accepted for the Summer of Code, so this project can now start accepting applications. Good luck everyone! https://summerofcode.withgoogle.com/programs/2022/organizations/cncf |
This comment was marked as spam.
This comment was marked as spam.
Hi, @vmg I'm interested in working on this project, so the project's scope will be to implement all the leftover functions or just some part of it during the LFX mentorship time window ? |
Hi, @vmg I am trying to understand how evalengine works. And I find all |
Hi @skant7! As explained in the description, implementing all the missing functionality in the evalengine during your internship is unfeasible, so as part of your application you should come up with a subset of the functionality that you think would be useful to implement and that would fit in the duration of the program. |
@Weijun-H: good catch! The bitwise functions were already implemented but we didn't update the issue. I've ticked their boxes -- I don't think any further work needs to be done on them (unless I missed some corner cases). A good place to look are a lot of the string helper functions, which are all still missing. |
@vmg Hey! I was looking to work on this issue during GSoC'23. Could you please give me a few pointers so I can better understand the codebase around the issue? |
So for all these new applicants, applying to these programs like GSOC, LFX, etc. on what basis are they selected, considering the fact that an applicant has no prior experience in Golang, necessary tools, and the development of the project? |
Hey @Anu-Ra-g! I am going very soon on paternity leave (:baby: :tada:) so there isn't going to be any For all the other Vitess-related projects that we're going to have this year in GSOC and LFX, we're looking for actual experience in Golang. As a rule of thumb, you're supposed to apply to internship projects for languages you have a beginner-intermediate expertise with, because the mentorship time must be spent actually onboarding you on the technical details of the project, not teaching you how to program in Go. Cheers! |
The last major shortcoming of the evaluation engine are the many built-in SQL functions that ship with MySQL and which we currently do not support. Since adding support for these functions is an arduous, iterative project, this tracking issue intends to act as an authoritative list of the progress we've made bringing these functions over.
Comparison Operators
>
Greater than operator>=
Greater than or equal operator<
Less than operator<>, !=
Not equal operator<=
Less than or equal operator<=>
NULL-safe equal to operator=
Equal operatorBETWEEN ... AND ...
Whether a value is within a range of valuesCOALESCE()
Return the first non-NULL argumentGREATEST()
Return the largest argumentIN()
Whether a value is within a set of valuesINTERVAL()
Return the index of the argument that is less than the first argumentIS
Test a value against a booleanIS NOT
Test a value against a booleanIS NOT NULL
NOT NULL value testIS NULL
NULL value testISNULL()
Test whether the argument is NULLLEAST()
Return the smallest argumentLIKE
Simple pattern matchingNOT BETWEEN ... AND ...
Whether a value is not within a range of valuesNOT IN()
Whether a value is not within a set of valuesNOT LIKE
Negation of simple pattern matchingSTRCMP()
Compare two stringsLogical Operators
AND, &&
Logical ANDNOT, !
Negates valueOR, ||
Logical ORXOR
Logical XORAssignment Operators
:=
Assign a value=
Assign a value (as part of a SET statement, or as part of the SET clause in an UPDATE statement)Flow Control Functions
CASE
Case operatorIF()
If/else constructIFNULL()
Null if/else constructNULLIF()
Return NULL if expr1 = expr2Numeric Functions and Operators
%, MOD
Modulo operator*
Multiplication operator+
Addition operator-
Minus operator-
Change the sign of the argument/
Division operatorABS()
Return the absolute valueACOS()
Return the arc cosineASIN()
Return the arc sineATAN()
Return the arc tangentATAN2(), ATAN()
Return the arc tangent of the two argumentsCEIL()
Return the smallest integer value not less than the argumentCEILING()
Return the smallest integer value not less than the argumentCONV()
Convert numbers between different number basesCOS()
Return the cosineCOT()
Return the cotangentCRC32()
Compute a cyclic redundancy check valueDEGREES()
Convert radians to degreesDIV
Integer divisionEXP()
Raise to the power ofFLOOR()
Return the largest integer value not greater than the argumentLN()
Return the natural logarithm of the argumentLOG()
Return the natural logarithm of the first argumentLOG10()
Return the base-10 logarithm of the argumentLOG2()
Return the base-2 logarithm of the argumentMOD()
Return the remainderPI()
Return the value of piPOW()
Return the argument raised to the specified powerPOWER()
Return the argument raised to the specified powerRADIANS()
Return argument converted to radiansRAND()
Return a random floating-point valueROUND()
Round the argumentSIGN()
Return the sign of the argumentSIN()
Return the sine of the argumentSQRT()
Return the square root of the argumentTAN()
Return the tangent of the argumentTRUNCATE()
Truncate to specified number of decimal placesDate and Time Functions
ADDDATE()
Add time values (intervals) to a date valueADDTIME()
Add timeCONVERT_TZ()
Convert from one time zone to anotherCURDATE()
Return the current dateCURRENT_DATE(), CURRENT_DATE
Synonyms for CURDATE()CURRENT_TIME(), CURRENT_TIME
Synonyms for CURTIME()CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP
Synonyms for NOW()CURTIME()
Return the current timeDATE()
Extract the date part of a date or datetime expressionDATE_ADD()
Add time values (intervals) to a date valueDATE_FORMAT()
Format date as specifiedDATE_SUB()
Subtract a time value (interval) from a dateDATEDIFF()
Subtract two datesDAY()
Synonym for DAYOFMONTH()DAYNAME()
Return the name of the weekdayDAYOFMONTH()
Return the day of the month (0-31)DAYOFWEEK()
Return the weekday index of the argumentDAYOFYEAR()
Return the day of the year (1-366)EXTRACT()
Extract part of a dateFROM_DAYS()
Convert a day number to a dateFROM_UNIXTIME()
Format Unix timestamp as a dateGET_FORMAT()
Return a date format stringHOUR()
Extract the hourLAST_DAY
Return the last day of the month for the argumentLOCALTIME(), LOCALTIME
Synonym for NOW()LOCALTIMESTAMP, LOCALTIMESTAMP()
Synonym for NOW()MAKEDATE()
Create a date from the year and day of yearMAKETIME()
Create time from hour, minute, secondMICROSECOND()
Return the microseconds from argumentMINUTE()
Return the minute from the argumentMONTH()
Return the month from the date passedMONTHNAME()
Return the name of the monthNOW()
Return the current date and timePERIOD_ADD()
Add a period to a year-monthPERIOD_DIFF()
Return the number of months between periodsQUARTER()
Return the quarter from a date argumentSEC_TO_TIME()
Converts seconds to 'hh:mm:ss' formatSECOND()
Return the second (0-59)STR_TO_DATE()
Convert a string to a dateSUBDATE()
Synonym for DATE_SUB() when invoked with three argumentsSUBTIME()
Subtract timesSYSDATE()
Return the time at which the function executesTIME()
Extract the time portion of the expression passedTIME_FORMAT()
Format as timeTIME_TO_SEC()
Return the argument converted to secondsTIMEDIFF()
Subtract timeTIMESTAMP()
With a single argument, this function returns the date or datetime expression; with two arguments, the sum of the argumentsTIMESTAMPADD()
Add an interval to a datetime expressionTIMESTAMPDIFF()
Subtract an interval from a datetime expressionTO_DAYS()
Return the date argument converted to daysTO_SECONDS()
Return the date or datetime argument converted to seconds since Year 0UNIX_TIMESTAMP()
Return a Unix timestampUTC_DATE()
Return the current UTC dateUTC_TIME()
Return the current UTC timeUTC_TIMESTAMP()
Return the current UTC date and timeWEEK()
Return the week numberWEEKDAY()
Return the weekday indexWEEKOFYEAR()
Return the calendar week of the date (1-53)YEAR()
Return the yearYEARWEEK()
Return the year and weekString Functions and Operators
ASCII()
Return numeric value of left-most characterBIN()
Return a string containing binary representation of a numberBIT_LENGTH()
Return length of argument in bitsCHAR()
Return the character for each integer passedCHAR_LENGTH()
Return number of characters in argumentCHARACTER_LENGTH()
Synonym for CHAR_LENGTH()CONCAT()
Return concatenated stringCONCAT_WS()
Return concatenate with separatorELT()
Return string at index numberEXPORT_SET()
Return a string such that for every bit set in the value bits, you get an on string and for every unset bit, you get an off stringFIELD()
Index (position) of first argument in subsequent argumentsFIND_IN_SET()
Index (position) of first argument within second argumentFORMAT()
Return a number formatted to specified number of decimal placesFROM_BASE64()
Decode base64 encoded string and return resultHEX()
Hexadecimal representation of decimal or string valueINSERT()
Insert substring at specified position up to specified number of charactersINSTR()
Return the index of the first occurrence of substringLCASE()
Synonym for LOWER()LEFT()
Return the leftmost number of characters as specifiedLENGTH()
Return the length of a string in bytesLIKE
Simple pattern matchingLOAD_FILE()
Load the named fileLOCATE()
Return the position of the first occurrence of substringLOWER()
Return the argument in lowercaseLPAD()
Return the string argument, left-padded with the specified stringLTRIM()
Remove leading spacesMAKE_SET()
Return a set of comma-separated strings that have the corresponding bit in bits setMATCH()
Perform full-text searchMID()
Return a substring starting from the specified positionNOT LIKE
Negation of simple pattern matchingNOT REGEXP
Negation of REGEXPOCT()
Return a string containing octal representation of a numberOCTET_LENGTH()
Synonym for LENGTH()ORD()
Return character code for leftmost character of the argumentPOSITION()
Synonym for LOCATE()QUOTE()
Escape the argument for use in an SQL statement #13849REGEXP
Whether string matches regular expressionREGEXP_INSTR()
Starting index of substring matching regular expressionREGEXP_LIKE()
Whether string matches regular expressionREGEXP_REPLACE()
Replace substrings matching regular expressionREGEXP_SUBSTR()
Return substring matching regular expressionREPEAT()
Repeat a string the specified number of timesREPLACE()
Replace occurrences of a specified stringREVERSE()
Reverse the characters in a stringRIGHT()
Return the specified rightmost number of charactersRLIKE
Whether string matches regular expressionRPAD()
Append string the specified number of timesRTRIM()
Remove trailing spacesSOUNDEX()
Return a soundex stringSOUNDS LIKE
Compare soundsSPACE()
Return a string of the specified number of spacesSTRCMP()
Compare two stringsSUBSTR()
Return the substring as specifiedSUBSTRING()
Return the substring as specifiedSUBSTRING_INDEX()
Return a substring from a string before the specified number of occurrences of the delimiterTO_BASE64()
Return the argument converted to a base-64 stringTRIM()
Remove leading and trailing spacesUCASE()
Synonym for UPPER()UNHEX()
Return a string containing hex representation of a numberUPPER()
Convert to uppercaseWEIGHT_STRING()
Return the weight string for a stringCast Functions
CAST()
Cast a value as a certain typeCONVERT()
Cast a value as a certain typeBit Functions and Operators
&
Bitwise AND>>
Right shift<<
Left shift^
Bitwise XORBIT_COUNT()
Return the number of bits that are set|
Bitwise OR~
Bitwise inversionJSON
->
Return value from JSON column after evaluating path; equivalent to JSON_EXTRACT().->>
Return value from JSON column after evaluating path and unquoting the result; equivalent to JSON_UNQUOTE(JSON_EXTRACT()).JSON_ARRAY()
Create JSON arrayJSON_ARRAY_APPEND()
Append data to JSON documentJSON_ARRAY_INSERT()
Insert into JSON arrayJSON_CONTAINS()
Whether JSON document contains specific object at pathJSON_CONTAINS_PATH()
Whether JSON document contains any data at pathJSON_DEPTH()
Maximum depth of JSON documentJSON_EXTRACT()
Return data from JSON documentJSON_INSERT()
Insert data into JSON documentJSON_KEYS()
Array of keys from JSON documentJSON_LENGTH()
Number of elements in JSON documentJSON_MERGE()
Merge JSON documents, preserving duplicate keys. Deprecated synonym for JSON_MERGE_PRESERVE()JSON_MERGE_PATCH()
Merge JSON documents, replacing values of duplicate keysJSON_MERGE_PRESERVE()
Merge JSON documents, preserving duplicate keysJSON_OBJECT()
Create JSON objectJSON_OVERLAPS()
Compares two JSON documents, returns TRUE (1) if these have any key-value pairs or array elements in common, otherwise FALSE (0)JSON_PRETTY()
Print a JSON document in human-readable formatJSON_QUOTE()
Quote JSON documentJSON_REMOVE()
Remove data from JSON documentJSON_REPLACE()
Replace values in JSON documentJSON_SCHEMA_VALID()
Validate JSON document against JSON schema; returns TRUE/1 if document validates against schema, or FALSE/0 if it does notJSON_SCHEMA_VALIDATION_REPORT()
Validate JSON document against JSON schema; returns report in JSON format on outcome on validation including success or failure and reasons for failure 8.0.17JSON_SEARCH()
Path to value within JSON documentJSON_SET()
Insert data into JSON documentJSON_STORAGE_FREE()
Freed space within binary representation of JSON column value following partial updateJSON_STORAGE_SIZE()
Space used for storage of binary representation of a JSON documentJSON_TABLE()
Return data from a JSON expression as a relational tableJSON_TYPE()
Type of JSON valueJSON_UNQUOTE()
Unquote JSON valueJSON_VALID()
Whether JSON value is validJSON_VALUE()
Extract value from JSON document at location pointed to by path provided; return this value as VARCHAR(512) or specified typeMEMBER OF()
Returns true (1) if first operand matches any element of JSON array passed as second operand, otherwise returns false (0)XML Functions
ExtractValue()
Extract a value from an XML string using XPath notationUpdateXML()
Return replaced XML fragmentEncryption and Compression Functions
AES_DECRYPT()
Decrypt using AESAES_ENCRYPT()
Encrypt using AESCOMPRESS()
Return result as a binary stringMD5()
Calculate MD5 checksumRANDOM_BYTES()
Return a random byte vectorSHA1(), SHA()
Calculate an SHA-1 160-bit checksumSHA2()
Calculate an SHA-2 checksumSTATEMENT_DIGEST()
Compute statement digest hash valueSTATEMENT_DIGEST_TEXT()
Compute normalized statement digestUNCOMPRESS()
Uncompress a string compressedUNCOMPRESSED_LENGTH()
Return the length of a string before compressionVALIDATE_PASSWORD_STRENGTH()
Determine strength of passwordMiscellaneous Functions
ANY_VALUE()
Suppress ONLY_FULL_GROUP_BY value rejectionBIN_TO_UUID()
Convert binary UUID to stringDEFAULT()
Return the default value for a table columnGROUPING()
Distinguish super-aggregate ROLLUP rows from regular rowsINET_ATON()
Return the numeric value of an IP addressINET_NTOA()
Return the IP address from a numeric valueINET6_ATON()
Return the numeric value of an IPv6 addressINET6_NTOA()
Return the IPv6 address from a numeric valueIS_IPV4()
Whether argument is an IPv4 addressIS_IPV4_COMPAT()
Whether argument is an IPv4-compatible addressIS_IPV4_MAPPED()
Whether argument is an IPv4-mapped addressIS_IPV6()
Whether argument is an IPv6 addressIS_UUID()
Whether argument is a valid UUIDMASTER_POS_WAIT()
Block until the replica has read and applied all updates up to the specified positionNAME_CONST()
Cause the column to have the given nameSLEEP()
Sleep for a number of secondsSOURCE_POS_WAIT()
Block until the replica has read and applied all updates up to the specified positionUUID()
Return a Universal Unique Identifier (UUID)UUID_SHORT()
Return an integer-valued universal identifierUUID_TO_BIN()
Convert string UUID to binaryVALUES()
Define the values to be used during an INSERTThe text was updated successfully, but these errors were encountered: