Class TemplateUtils


  • public class TemplateUtils
    extends Object
    • Field Detail

    • Constructor Detail

      • TemplateUtils

        public TemplateUtils()
    • Method Detail

      • isVector

        public static boolean isVector​(Hop hop)
      • isColVector

        public static boolean isColVector​(Hop hop)
      • isColVector

        public static boolean isColVector​(CNode hop)
      • isRowVector

        public static boolean isRowVector​(CNode hop)
      • isMatrix

        public static boolean isMatrix​(CNode hop)
      • wrapLookupIfNecessary

        public static CNode wrapLookupIfNecessary​(CNode node,
                                                  Hop hop)
      • wrapLookupIfNecessary

        public static CNode wrapLookupIfNecessary​(CNode node,
                                                  Hop hop,
                                                  boolean rowTpl)
      • isMatrix

        public static boolean isMatrix​(Hop hop)
      • isVectorOrScalar

        public static boolean isVectorOrScalar​(Hop hop)
      • isBinaryMatrixRowVector

        public static boolean isBinaryMatrixRowVector​(Hop hop)
      • isBinaryMatrixColVector

        public static boolean isBinaryMatrixColVector​(Hop hop)
      • hasMatrixInput

        public static boolean hasMatrixInput​(Hop hop)
      • isOperationSupported

        public static boolean isOperationSupported​(Hop h)
      • isLiteral

        public static boolean isLiteral​(CNode node)
      • isLiteral

        public static boolean isLiteral​(CNode node,
                                        String val)
      • isLookup

        public static boolean isLookup​(CNode node,
                                       boolean includeRC1)
      • isUnaryRowAgg

        public static boolean isUnaryRowAgg​(CNode node)
      • rContainsInput

        public static boolean rContainsInput​(CNode node,
                                             long hopID)
      • createCNodeData

        public static CNodeData createCNodeData​(Hop hop,
                                                boolean compileLiterals)
      • findRemovableConditionalPatternInOuterProduct

        public static LinkedList<Long> findRemovableConditionalPatternInOuterProduct​(Hop hop)
      • skipConditionalInOuterProduct

        public static long skipConditionalInOuterProduct​(Hop hop,
                                                         HashMap<Long,​CNode> tmp,
                                                         HashSet<Hop> inHops)
      • hasTransposeParentUnderOuterProduct

        public static boolean hasTransposeParentUnderOuterProduct​(Hop hop)
      • hasSingleOperation

        public static boolean hasSingleOperation​(CNodeTpl tpl)
      • isValidSingleOperation

        public static boolean isValidSingleOperation​(Hop hop)
      • hasNoOperation

        public static boolean hasNoOperation​(CNodeTpl tpl)
      • hasOnlyDataNodeOrLookupInputs

        public static boolean hasOnlyDataNodeOrLookupInputs​(CNode node)
      • determineMinVectorIntermediates

        public static int determineMinVectorIntermediates​(CNode node,
                                                          CNode main)
      • isUnaryOperatorPipeline

        public static boolean isUnaryOperatorPipeline​(CNode node)
      • getMaxVectorIntermediates

        public static int getMaxVectorIntermediates​(CNode node)
      • countVectorIntermediates

        public static int countVectorIntermediates​(CNode node)
      • getMaxLiveVectorIntermediates

        public static int getMaxLiveVectorIntermediates​(CNode node,
                                                        CNode main,
                                                        Map<Long,​Set<Long>> parents,
                                                        Set<org.apache.commons.lang3.tuple.Pair<Long,​Long>> stack)
      • isValidNumVectorIntermediates

        public static boolean isValidNumVectorIntermediates​(CNode node,
                                                            CNode main,
                                                            Map<Long,​Set<Long>> parents,
                                                            Map<Long,​org.apache.commons.lang3.tuple.Pair<Long,​org.apache.commons.lang3.mutable.MutableInt>> inUse,
                                                            Set<Long> inUse2,
                                                            int count)
      • rIsValidNumVectorIntermediates

        public static boolean rIsValidNumVectorIntermediates​(CNode node,
                                                             CNode main,
                                                             Map<Long,​Set<Long>> parents,
                                                             Map<Long,​org.apache.commons.lang3.tuple.Pair<Long,​org.apache.commons.lang3.mutable.MutableInt>> inUse,
                                                             Set<Long> inUse2,
                                                             IDSequence buff)
      • getAllParents

        public static void getAllParents​(CNode node,
                                         Map<Long,​Set<Long>> parents)
      • hasCommonRowTemplateMatrixInput

        public static boolean hasCommonRowTemplateMatrixInput​(Hop input1,
                                                              Hop input2,
                                                              CPlanMemoTable memo)
      • getRowTemplateMatrixInput

        public static long getRowTemplateMatrixInput​(Hop current,
                                                     CPlanMemoTable memo)
      • containsOuterProduct

        public static boolean containsOuterProduct​(Hop hop)
      • containsOuterProduct

        public static boolean containsOuterProduct​(Hop hop,
                                                   Hop probe)
      • rFlipVectorLookups

        public static void rFlipVectorLookups​(CNode current)
      • containsFusedRowVecAgg

        public static boolean containsFusedRowVecAgg​(CNodeTpl tpl)