MCPcopy
hub / github.com/uber/aresdb / SampledRelation

Method SampledRelation

query/sql/antlrgen/sqlbase_parser.go:4227–4283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4225}
4226
4227func (p *SqlBaseParser) SampledRelation() (localctx ISampledRelationContext) {
4228 localctx = NewSampledRelationContext(p, p.GetParserRuleContext(), p.GetState())
4229 p.EnterRule(localctx, 34, SqlBaseParserRULE_sampledRelation)
4230
4231 defer func() {
4232 p.ExitRule()
4233 }()
4234
4235 defer func() {
4236 if err := recover(); err != nil {
4237 if v, ok := err.(antlr.RecognitionException); ok {
4238 localctx.SetException(v)
4239 p.GetErrorHandler().ReportError(p, v)
4240 p.GetErrorHandler().Recover(p, v)
4241 } else {
4242 panic(err)
4243 }
4244 }
4245 }()
4246
4247 p.EnterOuterAlt(localctx, 1)
4248 {
4249 p.SetState(318)
4250 p.AliasedRelation()
4251 }
4252 p.SetState(325)
4253 p.GetErrorHandler().Sync(p)
4254
4255 if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 39, p.GetParserRuleContext()) == 1 {
4256 {
4257 p.SetState(319)
4258 p.Match(SqlBaseParserTABLESAMPLE)
4259 }
4260 {
4261 p.SetState(320)
4262 p.SampleType()
4263 }
4264 {
4265 p.SetState(321)
4266 p.Match(SqlBaseParserT__1)
4267 }
4268 {
4269 p.SetState(322)
4270
4271 var _x = p.Expression()
4272
4273 localctx.(*SampledRelationContext).percentage = _x
4274 }
4275 {
4276 p.SetState(323)
4277 p.Match(SqlBaseParserT__2)
4278 }
4279
4280 }
4281
4282 return localctx
4283}
4284

Callers 1

relationMethod · 0.95

Calls 5

AliasedRelationMethod · 0.95
SampleTypeMethod · 0.95
ExpressionMethod · 0.95
ReportErrorMethod · 0.65

Tested by

no test coverage detected