| 6462 | } |
| 6463 | |
| 6464 | bool FieldNode::dsqlInvalidReferenceFinder(InvalidReferenceFinder& visitor) |
| 6465 | { |
| 6466 | // Wouldn't it be better to call an error from this point where return is true? |
| 6467 | // Then we could give the fieldname that's making the trouble. |
| 6468 | |
| 6469 | // If we come here then this field is used inside a aggregate-function. The |
| 6470 | // ctx_scope_level gives the info how deep the context is inside the statement. |
| 6471 | |
| 6472 | // If the context-scope-level from this field is lower or the same as the scope-level |
| 6473 | // from the given context then it is an invalid field. |
| 6474 | if (dsqlContext->ctx_scope_level == visitor.context->ctx_scope_level) |
| 6475 | { |
| 6476 | // Return true (invalid) if this field isn't inside the GROUP BY clause, that |
| 6477 | // should already been seen in the match_node test in that routine start. |
| 6478 | return true; |
| 6479 | } |
| 6480 | |
| 6481 | return false; |
| 6482 | } |
| 6483 | |
| 6484 | bool FieldNode::dsqlSubSelectFinder(SubSelectFinder& /*visitor*/) |
| 6485 | { |