VisitSampledRelation visits the node
(ctx *antlrgen.SampledRelationContext)
| 816 | |
| 817 | // VisitSampledRelation visits the node |
| 818 | func (v *ASTBuilder) VisitSampledRelation(ctx *antlrgen.SampledRelationContext) interface{} { |
| 819 | v.Logger.Debugf("VisitSampledRelation: %s", ctx.GetText()) |
| 820 | |
| 821 | location := v.getLocation(ctx) |
| 822 | level, levelWith, levelQuery := v.getCtxLevels(v.SQL2AqlCtx) |
| 823 | |
| 824 | v.setCtxLevels(v.SQL2AqlCtx, level, levelWith, levelQuery) |
| 825 | child, _ := v.VisitAliasedRelation(ctx.AliasedRelation().(*antlrgen.AliasedRelationContext)).(tree.IRelation) |
| 826 | if ctx.TABLESAMPLE() != nil { |
| 827 | panic(fmt.Errorf("TABLESAMPLE not implemented at (line:%d, col:%d)", location.Line, location.CharPosition)) |
| 828 | } |
| 829 | if child != nil { |
| 830 | child.SetValue(fmt.Sprintf("SampledRelation: (%s)", v.getText(ctx.BaseParserRuleContext))) |
| 831 | } |
| 832 | |
| 833 | v.setCtxLevels(v.SQL2AqlCtx, level-1, levelWith, levelQuery) |
| 834 | return child |
| 835 | } |
| 836 | |
| 837 | // VisitAliasedRelation visits the node |
| 838 | func (v *ASTBuilder) VisitAliasedRelation(ctx *antlrgen.AliasedRelationContext) interface{} { |
no test coverage detected