Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.11.0
-
None
-
None
-
None
Description
Consider the following query from the test framework (Functional/table_function/positive/drill-3149_10.q):
select * from table(`table_function/colons.txt`(type=>'text',lineDelimiter=>'\\'))
Notice the double-backslash. Drill translates this into a single backslash. But, what happens if the user provides just a single backslash? Drill translates that into the empty string. Drill passes the empty string to the text reader, which fails with the error described in DRILL-5929.
Better would be to either:
- Leave lone back-slashes unchanged, or
- Fail a query with an lone backslash.
The fix for this bug prefers the first (because it is easiest.) However, this fix does not handle a triple backslash, which will be translated to a single backslash:
- \ \ --> \
- \ --> (nothing)
The code in question:
class FormatPluginOp ...
FormatPluginConfig createConfigForTable(TableInstance t) {
...
param = StringEscapeUtils.unescapeJava(param);
Attachments
Issue Links
- Is contained by
-
DRILL-6986 Table function improvements / issues (UMBRELLA JIRA)
- Open