clp
clp copied to clipboard
webui: Unquote clp queries before submitting them to the backend (fixes #344).
References
#344
Description
Users of clp (the "clp" storage engine in the CLP package) expect to be able to quote their queries so that delimiters like spaces are more obvious when sent to the backend. This PR adds support for that.
The specific quoting behaviour is as follows:
- Users can either enter their query without quotes, or with double-quotes (") wrapping both ends of the query.
- Double-quotes within the query must be escaped with the '' escape character.
- Non-double-quotes that are escaped are preserved, e.g., wildcards and notably, escapes.
- This non-standard behaviour is so that users don't need to insert extra escapes just to pass escaped wildcards to clp.
Validation performed
- Validated new unit tests pass.
- Validated queries against a clp package:
- Compressed the hive-24hr dataset
sbin/compress.sh hive-24hr
- Tested the following queries from the webui:
-
info
was sent to the backend verbatim -
" info "
was sent asinfo
-
"\"mapreduce_shuffle\""
was sent as"mapreduce_shuffle"
-
BLOCK\*
was sent asBLOCK\*
-
"BLOCK\*"
was sent asBLOCK\*
-
\\
was sent as\\
-
"\\"
was sent as\\
-
- Compressed the hive-24hr dataset
- Validated queries against clp-s are passed verbatim to the backend.