horaedb
horaedb copied to clipboard
Persist final physical exprs after analyzing default value options
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 betweenarrow-ballistaandarrow-datafusion. - As suggested by @waynexia,
arrow-datafusionhas a issue about move serde ofPhysicalExprtoarrow-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