Commit 1af8b3e
authored
ESQL: URL encoding changes (#134503)
- Change URL_ENCODE to encode spaces as +.
- Add a new URL_ENCODE_COMPONENT scalar function, which encodes spaces as %20.
- Both encoding functions encode all characters in the input except for alphanumerics, ., -, _, and ~.
- Allow URL_DECODE to fail gracefully if the input can't be decoded, by returning null and adding a warning in the header, similar to other scalar functions.
- Manually perform percent-encoding directly on the BreakingBytesRefBuilder scratch area, and only if the input was gonna change after encoding.
- Update csv-tests:
- Test decoding for both + and %20 back to space.
- Reduce the length of doc lines to less than 76 chars, as mentioned in the contribution guide.
- Add test cases with fixed strings
- Minor changes to the documentation.
- Update Unit tests:
- Add fixed test cases that fail decoding
- Randomize the encoder used in decoding tests
- Use Apache's PercentEncode as the ground truth during unit testing.1 parent 09d0c7a commit 1af8b3e
File tree
35 files changed
+933
-102
lines changed- docs/reference/query-languages/esql
- _snippets/functions
- description
- examples
- layout
- parameters
- types
- images/functions
- kibana
- definition/functions
- docs/functions
- x-pack/plugin/esql
- qa/testFixtures/src/main/resources
- src
- main
- generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert
- java/org/elasticsearch/xpack/esql
- action
- expression
- function
- scalar
- convert
- util
- test/java/org/elasticsearch/xpack/esql/expression/function
- scalar/convert
35 files changed
+933
-102
lines changedLines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments