Skip to content

Commit 17ac585

Browse files
author
Harish Butani
committed
more documentation for folding into Hive
1 parent 7827685 commit 17ac585

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/foldIntoHive/PTFInHive.org

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,3 +625,18 @@ Expression not in GROUP BY key 'p_partkey'
625625

626626

627627

628+
* Implementation details
629+
** Changes to genPlan
630+
- If a PTF Chain is a fromSource:
631+
- the 1st source of the Chain should be added to the QueryBlock as
632+
a source table or as a SubQuery.
633+
- Invoke genPTFChain on the AST of the PTFChain. The input is the
634+
Operator for the Table or the SubQuery.
635+
- Generate a ReduceSink -> Extract -> PTFOp for each subchain.
636+
- If the Query has WindowingClauses and no Group By and only a
637+
PTFChain as the input add the WindowingTableFunc to the chain.
638+
- If there are Windowing clauses:
639+
- provided they not already handled by appending to the from Clause
640+
PTF Chain.
641+
- Setup a PTFChain with only the WindowingTableFunction PTF.
642+
- Its input is the Operator after handling the Having clause.

0 commit comments

Comments
 (0)