Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
expression: do not set ParseToJSONFlag to a JSON column #8564
What problem does this PR solve?
Do not set ParseToJSONFlag to a JSON column which can avoid the data race when another goroutine tries to read the column's flag.
What is changed and how it works?
ParseToJSONFlag is used to effect the behavior of castStringAsJSON.
ParseToJSONFlag is introduced to resolve the compatibility of compare function and JSON-related function with MySQL.
json_unquote(str) -- We use CreateBinary(str) json_merge(str, str) -- We use ParseBinaryFromString(str)
For a JSON column, we do not need to set this flag for it.