private static void constructEmitFromClause ( LinkedList < SchemaTableTree > distinctQueryStack , ColumnList cols ) { int count = 1 ; for ( SchemaTableTree schemaTableTree : distinctQueryStack ) { if ( count > 1 ) { if ( ! schemaTableTree . getSchemaTable ( ) . isEdgeTable ( ) && schemaTableTree . isEmit ( ) ) { //if the VertexStep is for an edge table there is no need to print edge ids as its already printed. printEdgeId ( schemaTableTree . parent , cols ) ; } } count ++ ; } }
If emit is true then the edge id also needs to be printed . This is required when there are multiple edges to the same vertex . Only by having access to the edge id can on tell if the vertex needs to be emitted .