forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.1] [ML] Text structure finder caps exclude lines pattern at 1000 c…
…haracters Because of the way Filebeat parses CSV files the text structure finder needs to generate a regular expression that will ignore the header row of the CSV file. It does this by concatenating the column names separated by the delimiter with optional quoting. However, if there are hundreds of columns this can lead to a very long regular expression, potentially one that cannot be evaluated by some programming languages. This change limits the length of the regular expression to 1000 characters by only including elements for the first few columns when there are many. Matching 1000 characters of header should be sufficient to reliably identify the header row even when it is much longer. It is extremely unlikely that there would be a data row where the first 1000 characters exactly matched the header but then subsequent fields diverged. Backport of elastic#84236
- Loading branch information
1 parent
e39413d
commit 07920cd
Showing
3 changed files
with
66 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 84236 | ||
summary: Text structure finder caps exclude lines pattern at 1000 characters | ||
area: Machine Learning | ||
type: bug | ||
issues: | ||
- 83434 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters