diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2019-05-08 12:01:03 +0800 |
---|---|---|
committer | Ting-Wei Lan <tingwei.lan@cobinhood.com> | 2019-05-14 11:04:15 +0800 |
commit | 7a237ad79f7d7e6ed1a875ee700805b6d9d3791b (patch) | |
tree | a9a789b690907b64259e79492d6068ec7d62da15 /light/postprocess.go | |
parent | d1a4d441c8121dd92d19054ef3ec6995f0974957 (diff) | |
download | dexon-7a237ad79f7d7e6ed1a875ee700805b6d9d3791b.tar dexon-7a237ad79f7d7e6ed1a875ee700805b6d9d3791b.tar.gz dexon-7a237ad79f7d7e6ed1a875ee700805b6d9d3791b.tar.bz2 dexon-7a237ad79f7d7e6ed1a875ee700805b6d9d3791b.tar.lz dexon-7a237ad79f7d7e6ed1a875ee700805b6d9d3791b.tar.xz dexon-7a237ad79f7d7e6ed1a875ee700805b6d9d3791b.tar.zst dexon-7a237ad79f7d7e6ed1a875ee700805b6d9d3791b.zip |
core: vm: sqlvm: parser: support IS TRUE / FALSE / UNKNOWN
To allow comparing directly with the value of a three-valued boolean
without being affected by the semantic of = operator, we have to support
SQL <boolean test> syntax.
To keep the parser simple, UNKNOWN is considered as a boolean literal
and it can be used outside of IS. It seems to me that the SQL standard
suggests that this is the correct behavior because UNKNOWN is listed
in both <boolean literal> and <truth value>.
This behavior seems to be different from what PostgreSQL and MySQL do.
They only recognize UNKNOWN when it is used at the right-hand side of IS
and consider it as an identifier when it is used outside of IS. However,
the standard says UNKNOWN is a reserved word, so automatically making
UNKNOWN an identifier looks non-standard to me.
Diffstat (limited to 'light/postprocess.go')
0 files changed, 0 insertions, 0 deletions