Daniel Barclay (Drill) created DRILL-3816: ---------------------------------------------
Summary: weird file-extension recognition behavior in directory subtree scanning Key: DRILL-3816 URL: https://issues.apache.org/jira/browse/DRILL-3816 Project: Apache Drill Issue Type: Bug Components: Storage - Other Reporter: Daniel Barclay (Drill) Assignee: Jacques Nadeau In scanning of directory subtrees for files, recognition of known vs. unknown file extensions seems really screwy (not following any apparent pattern). For example: - a suffix of {{.jsxon_not}}, as expected, is not recognized as a JSON file - a suffix of {{.jsoxn_not}} unexpectedly _is_ taken as JSON - a suffix of .{{jsonx_not}}, as expected, is not recognized as a JSON file (Creating a directory containing only a non-empty JSON file ending with {{.json}} and another non-empty JSON file ending with one of the above suffixes sometimes reads both JSON files and sometimes reports a (presumably) expected error because of the mixed file extensions).) The result sometimes seems to also depend on the rest of the filename, presumably related to the order of listing of files. (It's not clear if it depends only on the order after filename sorting, or also depends on the order file names are listed the by OS.) Here are more data points (using a JSON file named {{voter1.json}}): - with {{voter2.xjson_not}} - read, as JSON - with {{voter2.jxson_not}} - read, as JSON - with {{voter2.jsxon_not}} - causes expected error - with {{voter2.jsoxn_not}} - read, as JSON - with {{voter2.jsonx_not}} - causes expected error - with {{voter2.json_xnot}} - read, as JSON - with {{voter2.json_nxot}} - read, as JSON - with {{voter2.json_noxt}} - read, as JSON - with {{voter2.json_notx}} - read, as JSON - with {{voter2.jsonxnot}} - read, as JSON - with {{voter2.jsonxot}} - read, as JSON - with {{voter2.jsoxot}} - causes expected error - with {{voter2.jxsxoxn}} - read, as JSON - with {{voter2.xjxsxoxn}} - read, as JSON - with {{voter2.xjxsxoxnx}} - causes expected error - with {{voter2.xjxxoxn}} - read, as JSON - with {{voter2.xjxxxn} - read, as JSON - with {{voter2.xxxxn} - read, as JSON - with {{voter2.xxxx} - read, as JSON - with {{voter2.xxx}} - read, as JSON - with {{voter2.xx}} - read, as JSON - with {{voter2.x}} - read, as JSON - with {{voter2.}} - causes expected error - with {{voter2.xxxxx - read, as JSON - with {{voter2.xxxxxx - read, as JSON -- This message was sent by Atlassian JIRA (v6.3.4#6332)