calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alireza Samadian <asamad...@google.com.INVALID>
Subject Row Count Estimation for Volcano Optimizer
Date Mon, 20 May 2019 16:55:29 GMT
Hi,

I'm working on Beam SQL and we are using Apache Calcite for our query
parsing and optimization. We are trying to use row count estimates for
Volcano Optimizer. Currently, Calcite returns row count estimate of 100 for
every table.
It seems the cost estimate comes from bunch of handlers in
org.apache.calcite.rel.metadata.RelMetadataQuery; however, apparently the
handlers are automatically generated and I cannot figure out how I can pass
my own handler for cost estimation. Also, I am not even sure if this is the
standard way of passing my own cost estimates.
I found this thread in StackOverflow:
https://stackoverflow.com/questions/54726015/why-does-apache-calcite-estimates-100-rows-for-all-tables-a-query-contains/54739313#54739313

One of the replies suggests that the only way to inject cardinality
estimates for tables is via an ExternalCatalog. I cannot find any
information about ExternalCatalog and I am not sure even what it is.

I will appreciate if someone guides me or send me some links or examples.

Best,
Alireza Samadian

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message