Make ast.Query a concrete class