> When LLAP Execution Mode is set to 'only' you can't have a macro and window > function in the same select statement.
The "only" part isn't enforced for the simple select query, but is enforced for the complex one (the PTF one). > select col_1, col_2 from macro_bug where otrim(col_1) is not null; That becomes a non-LLAP case, because macro_bug is so small - to trigger this issue for that query, force it through the Llap decider. set hive.fetch.task.conversion=none; I know that's not entirely helpful here, but the point is that the macros are not expanded in Hive at compile-time. Filter Operator predicate: otrim(col_1) is not null (type: boolean) is what I get in the plan, which LLAP recognizes as a "temporary function". The actual expansion is actually evaluated at runtime by GenericUDFMacro, not expanded by the compiler. If you're 100% sure the temporary function will work, you can take off the safety rails and try with set hive.llap.skip.compile.udf.check=true; which will just let LLAP plan deserialization figure out if has the necessary classes/fail (& not care about the "name" of the UDF). Cheers, Gopal