horaedb icon indicating copy to clipboard operation
horaedb copied to clipboard

Persist final physical exprs after analyzing default value options

Open ygf11 opened this issue 2 years ago • 0 comments

Describe This Problem

For default value options, we persist sqlparser expr to meta store now.

A better way is to save final physical exprs, because we can avoid to transform from sqlparser expr to physical expr every time we use it.

Proposal

Persist final physical exprs after analyzing. The problem is how to serialize datafusion's PhysicalExpr:

  • Introduce arrow-ballista, which has implemented this api, but we need fork and maintain the relationship between arrow-ballista and arrow-datafusion.
  • As suggested by @waynexia, arrow-datafusion has a issue about move serde of PhysicalExpr to arrow-datafusion. we can wait to see it.

Obviously the second way is easier to maintain and implement if the both works.

Additional Context

discussion: https://github.com/CeresDB/ceresdb/pull/246#discussion_r971660006

ygf11 avatar Sep 16 '22 04:09 ygf11