void resolveColumnIndexesUsingSchema ( NodeSchema inputSchema ) { // get all the TVEs in the output columns int difftor = 0 ; for ( SchemaColumn col : m_outputSchema ) { col . setDifferentiator ( difftor ) ; ++ difftor ; Collection < TupleValueExpression > allTves = ExpressionUtil . getTupleValueExpressions ( col . getExpression ( ) ) ; // and update their indexes against the table schema for ( TupleValueExpression tve : allTves ) { tve . setColumnIndexUsingSchema ( inputSchema ) ; assert ( tve . getColumnIndex ( ) >= 0 && tve . getColumnIndex ( ) < inputSchema . size ( ) ) ; } } // DON'T RE-SORT HERE }
Given an input schema resolve all the TVEs in all the output column expressions . This method is necessary to be able to do this for inlined projection nodes that don t have a child from which they can get an output schema .