-
Notifications
You must be signed in to change notification settings - Fork 25.2k
ESQL: TO_IP can handle leading zeros #126532
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
Changes from all commits
e5ea51f
11c6391
0c370b2
9f7af8e
1c9243c
2244bd5
66536ef
67882f1
70b1df6
6755093
4e40255
c406a8d
103a2dd
07b92a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 126532 | ||
summary: TO_IP can handle leading zeros | ||
area: ES|QL | ||
type: bug | ||
issues: | ||
- 125460 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@timestamp:date ,system:keyword,message:keyword | ||
2023-10-23T13:55:01.543Z, ping,Pinging 192.168.86.046 | ||
2023-10-23T13:55:01.544Z, cron,Running cats | ||
2023-10-23T13:55:01.545Z, java,Doing java stuff for 192.168.86.038 | ||
2023-10-23T13:55:01.546Z, java,More java stuff |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"properties" : { | ||
"@timestamp" : { | ||
"type" : "date" | ||
}, | ||
"system" : { | ||
"type" : "keyword" | ||
}, | ||
"message" : { | ||
"type" : "keyword" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be great to have some tests where the ip address with leading 0s appears in predicates with real indices, if they are valid use cases. For example,
Do we expect that the ip addresses with leading 0s can appear in index fields? I gave it a try and got this error, it seems like they cannot be loaded into indices as valid ips.
However it can be loaded into keyword fields, I changed the schema to have
client.ip
askeyword
.I tried some queries, the
to_ip
with leading 0s options, and it works on index fields too! I don't know if this is a valid use case, it seems like the original Github issue only mention leading 0s in string literals.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't index such a field, no. But with this ESQL can parse them!
Just like that, yeah.
I think it's valid. Let me add a test case for it too.