Running LogicalPlanOptimizerTests.testMetricsWithoutRate currently passes, but only because EsRelation.equals ignores the EsRelation's attributes.
Adding && Objects.equals(attrs, other.attrs); to EsRelation.equals shows that the three plans generated by this test deviate.
Inspection shows that
METRICS k8s count(to_long(network.total_bytes_in)) BY bucket(@timestamp, 1 minute)
| LIMIT 10
Creates an EsRelation with reference attributes bucket(@timestamp, 1 minute){r}#3 and $$to_long(network>$COUNT$0{r}#19, which the other plans do not have in their EsRelation (the plan's leaf).
This looks concerning, as EsRelations generally should have just field attributes; reference attributes normally refer to something coming from an index, enrich, dissect, grok or lookup.
Running
LogicalPlanOptimizerTests.testMetricsWithoutRate
currently passes, but only becauseEsRelation.equals
ignores theEsRelation
's attributes.Adding
&& Objects.equals(attrs, other.attrs);
toEsRelation.equals
shows that the three plans generated by this test deviate.Inspection shows that
Creates an
EsRelation
with reference attributesbucket(@timestamp, 1 minute){r}#3
and$$to_long(network>$COUNT$0{r}#19
, which the other plans do not have in theirEsRelation
(the plan's leaf).This looks concerning, as
EsRelation
s generally should have just field attributes; reference attributes normally refer to something coming from an index, enrich, dissect, grok or lookup.