SQL: Document reference equality requirement

Right now `ProcessorDefinition#resolveAttributes` relies on reference
equality to detect when the rewrite does nothing. At least, all the
nodes rely on this. Maybe this isn't that important, but it is what we
do so we may as well document it.

Original commit: elastic/x-pack-elasticsearch@662372db14
This commit is contained in:
Nik Everett 2018-01-09 11:11:56 -05:00
parent 25a00a3b55
commit 4009ba24b6
1 changed files with 7 additions and 0 deletions

View File

@ -37,6 +37,13 @@ public abstract class ProcessorDefinition extends Node<ProcessorDefinition> impl
// No fields needed
}
/**
* Resolve {@link Attribute}s which are unprocessable into
* {@link ColumnReference}s which are processable.
*
* @return {@code this} if the resolution doesn't change the
* definition, a new {@link ProcessorDefinition} otherwise
*/
public abstract ProcessorDefinition resolveAttributes(AttributeResolver resolver);
public interface AttributeResolver {
ColumnReference resolve(Attribute attribute);