@Override protected void toThrift(TPlanNode msg) { msg.node_type = TPlanNodeType.AGGREGATION_NODE; msg.agg_node = new TAggregationNode( Expr.treesToThrift(aggInfo.getAggregateExprs()), aggInfo.getAggTupleId().asInt(), needsFinalize); List<Expr> groupingExprs = aggInfo.getGroupingExprs(); if (groupingExprs != null) { msg.agg_node.setGrouping_exprs(Expr.treesToThrift(groupingExprs)); } }
public TDataPartition toThrift() { TDataPartition result = new TDataPartition(type); if (partitionExprs != null) { result.setPartition_exprs(Expr.treesToThrift(partitionExprs)); } return result; }
public THdfsPartition toThrift() { List<TExpr> thriftExprs = Expr.treesToThrift(getPartitionValues()); return new THdfsPartition( (byte) fileFormatDescriptor.getLineDelim(), (byte) fileFormatDescriptor.getFieldDelim(), (byte) fileFormatDescriptor.getCollectionDelim(), (byte) fileFormatDescriptor.getMapKeyDelim(), (byte) fileFormatDescriptor.getEscapeChar(), fileFormatDescriptor.getFileFormat().toThrift(), thriftExprs, fileFormatDescriptor.getBlockSize(), fileFormatDescriptor.getCompression()); }