internal override GremlinToSqlContext GetContext() { GremlinToSqlContext inputContext = GetInputContext(); if (inputContext.PivotVariable == null) { throw new TranslationException("The PivotVariable of group()-step can't be null."); } if (GroupBy == null) { GroupBy = GraphTraversal.__(); } if (ProjectBy == null) { ProjectBy = GraphTraversal.__(); } GroupBy.GetStartOp().InheritedVariableFromParent(inputContext); ProjectBy.GetStartOp().InheritedVariableFromParent(inputContext); GremlinToSqlContext groupByContext = GroupBy.GetEndOp().GetContext(); GremlinToSqlContext projectContext = ProjectBy.GetEndOp().GetContext(); inputContext.PivotVariable.Group(inputContext, SideEffect, groupByContext, projectContext, IsProjectingACollection); return(inputContext); }