caicancai commented on PR #4005:
URL: https://github.com/apache/calcite/pull/4005#issuecomment-2439814667

   > My main question is: is there a spec of Arrow so we can validate these 
strings that are emitted by the compiler? How do we know these are correct?
   
   @mihaibudiu Hello, I have read some arrow codes, and my current observation 
is this
   In the makeOr api, arrow.ornode will be generated, and serialization will be 
performed inside. I understand that the serialization process will require data 
verification to determine whether the data is legal
   ```
   class OrNode implements TreeNode {
     private final List<TreeNode> children;
   
     OrNode(List<TreeNode> children) {
       this.children = children;
     }
   
     @Override
     public GandivaTypes.TreeNode toProtobuf() throws GandivaException {
       GandivaTypes.OrNode.Builder orNode = GandivaTypes.OrNode.newBuilder();
   
       for (TreeNode arg : children) {
         orNode.addArgs(arg.toProtobuf());
       }
   
       GandivaTypes.TreeNode.Builder builder = 
GandivaTypes.TreeNode.newBuilder();
       builder.setOrNode(orNode.build());
       return builder.build();
     }
   }
   ```
   The same is true for other makeAnd and make Condition interfaces


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to