Description
A = load 'hbase://query/SELECT ID,NAME,DATE FROM HIRES WHERE DATE > TO_DATE('1990-12-21 05:55:00.000'); STORE A into 'output';
The above script throws an exception because it treats the location as an fs path and tries to convert it to a URI after splitting it based on comma.
The code that tries to the same is
String buildLoadOp(SourceLocation loc, String alias, String filename, FuncSpec funcSpec, LogicalSchema schema) throws ParserValidationException { String absolutePath; LoadFunc loFunc; try { // Load LoadFunc class from default properties if funcSpec is null. Fallback on PigStorage if LoadFunc is not specified in properties. funcSpec = funcSpec == null ? new FuncSpec(pigContext.getProperties().getProperty(PigConfiguration.PIG_DEFAULT_LOAD_FUNC, PigStorage.class.getName())) : funcSpec; loFunc = (LoadFunc)PigContext.instantiateFuncFromSpec(funcSpec); ...... ....... if (absolutePath == null) { absolutePath = loFunc.relativeToAbsolutePath( filename, QueryParserUtils.getCurrentDir( pigContext ) ); if (absolutePath!=null) { QueryParserUtils.setHdfsServers( absolutePath, pigContext ); } ..... }
We should not be calling QueryParserUtils.setHdfsServers(QueryParserUtils.java:104) should not be called for non-dfs methods
Attachments
Attachments
Issue Links
- blocks
-
PHOENIX-3464 Pig doesn't handle hbase://query/ properly
- Open