File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
optd-cost-model/src/common Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,13 @@ pub struct PredicateNode {
8282 /// TODO: If it is PredicateType::AttributeRef, then
8383 /// the data is attribute index. But we need more information
8484 /// to represent this attribute in case it is a derived attribute.
85+ /// 1. We can use Vec<Value>, but the disadvantage is that the optimizer
86+ /// may need to do some memory copy. (However, if we want to provide a
87+ /// general API, the memory copy is unavoidable. It applies for both 1
88+ /// and 2 designs). And Vec<Value> lacks readability.
89+ /// 2. Also we can use enum, but if Rust uses something like `union` to
90+ /// implement enum, then if some members are large, it will waste memory space,
91+ /// also causing unnecessary memory copy. But enum provides better readability.
8592 pub data : Option < Value > ,
8693}
8794
You can’t perform that action at this time.
0 commit comments