(String path, String namespace)
| 367 | } |
| 368 | |
| 369 | private static void addRegisterScriptUDFClause(String path, String namespace) |
| 370 | throws IOException { |
| 371 | ScriptPigContext ctx = getScriptContext(); |
| 372 | ScriptEngine engine = ctx.getScriptEngine(); |
| 373 | String clause = "REGISTER '" + path + "' USING " |
| 374 | + engine.getScriptingLang(); |
| 375 | if (namespace != null && !namespace.isEmpty()) { |
| 376 | clause += " AS " + namespace; |
| 377 | } |
| 378 | scriptUDFCache.add(clause + ";\n"); |
| 379 | } |
| 380 | |
| 381 | private static String getDefineClauses() { |
| 382 | StringBuilder sb = new StringBuilder(); |
no test coverage detected