Add scalar stats estimation for SymbolReference
@@ -18,6 +18,7 @@ import com.facebook.presto.metadata.Metadata;
import com.facebook.presto.sql.tree.AstVisitor;
import com.facebook.presto.sql.tree.Expression;
import com.facebook.presto.sql.tree.Node;
+import com.facebook.presto.sql.tree.SymbolReference;
import javax.inject.Inject;
@@ -55,5 +56,11 @@ public class ScalarStatsCalculator
{
return SymbolStatsEstimate.UNKNOWN_STATS;
}
+
+ @Override
+ protected SymbolStatsEstimate visitSymbolReference(SymbolReference node, Void context)
+ {
+ return input.getSymbolStatistics(Symbol.from(node));
+ }
}
}
