internal override GremlinToSqlContext GetContext() { GremlinToSqlContext inputContext = GetInputContext(); if (inputContext.PivotVariable == null) { throw new QueryCompilationException("The PivotVariable can't be null."); } GremlinToSqlContext dedupContext = null; if (ByTraversal != null) { ByTraversal.GetStartOp().InheritedVariableFromParent(inputContext); dedupContext = ByTraversal.GetEndOp().GetContext(); } // Dedup(local, "x", "y"), the dedupLabels should be ignored if (Scope == GremlinKeyword.Scope.local) { DedupLabels.Clear(); } inputContext.PivotVariable.Dedup(inputContext, DedupLabels, dedupContext, Scope); return(inputContext); }
internal override GremlinToSqlContext GetContext() { GremlinToSqlContext inputContext = GetInputContext(); if (inputContext.PivotVariable == null) { throw new TranslationException("The PivotVariable of dedup()-step can't be null."); } // Dedup(Local, "x", "y"), the dedupLabels should be ignored if (Scope == GremlinKeyword.Scope.Local) { DedupLabels.Clear(); } inputContext.PivotVariable.Dedup(inputContext, DedupLabels, ByTraversal, Scope); return(inputContext); }