@@ -498,6 +498,8 @@ class ArrowStreamNode : public PlanNode {
498
498
std::shared_ptr<ArrowArrayStream> arrowStream_;
499
499
};
500
500
501
+ using ArrowStreamNodePtr = std::shared_ptr<const ArrowStreamNode>;
502
+
501
503
class TraceScanNode final : public PlanNode {
502
504
public:
503
505
TraceScanNode (
@@ -614,6 +616,8 @@ class TraceScanNode final : public PlanNode {
614
616
const RowTypePtr outputType_;
615
617
};
616
618
619
+ using TraceScanNodePtr = std::shared_ptr<const TraceScanNode>;
620
+
617
621
class FilterNode : public PlanNode {
618
622
public:
619
623
FilterNode (const PlanNodeId& id, TypedExprPtr filter, PlanNodePtr source)
@@ -706,6 +710,8 @@ class FilterNode : public PlanNode {
706
710
const TypedExprPtr filter_;
707
711
};
708
712
713
+ using FilterNodePtr = std::shared_ptr<const FilterNode>;
714
+
709
715
class AbstractProjectNode : public PlanNode {
710
716
public:
711
717
AbstractProjectNode (
@@ -876,6 +882,8 @@ class ProjectNode : public AbstractProjectNode {
876
882
static PlanNodePtr create (const folly::dynamic& obj, void * context);
877
883
};
878
884
885
+ using ProjectNodePtr = std::shared_ptr<const ProjectNode>;
886
+
879
887
class TableScanNode : public PlanNode {
880
888
public:
881
889
TableScanNode (
@@ -1529,6 +1537,8 @@ class TableWriteNode : public PlanNode {
1529
1537
const connector::CommitStrategy commitStrategy_;
1530
1538
};
1531
1539
1540
+ using TableWriteNodePtr = std::shared_ptr<const TableWriteNode>;
1541
+
1532
1542
class TableWriteMergeNode : public PlanNode {
1533
1543
public:
1534
1544
// / 'outputType' specifies the type to store the metadata of table write
@@ -1632,6 +1642,8 @@ class TableWriteMergeNode : public PlanNode {
1632
1642
const RowTypePtr outputType_;
1633
1643
};
1634
1644
1645
+ using TableWriteMergeNodePtr = std::shared_ptr<const TableWriteMergeNode>;
1646
+
1635
1647
// / For each input row, generates N rows with M columns according to
1636
1648
// / specified 'projections'. 'projections' is an N x M matrix of expressions:
1637
1649
// / a vector of N rows each having M columns. Each expression is either a
@@ -1735,6 +1747,8 @@ class ExpandNode : public PlanNode {
1735
1747
const std::vector<std::vector<TypedExprPtr>> projections_;
1736
1748
};
1737
1749
1750
+ using ExpandNodePtr = std::shared_ptr<const ExpandNode>;
1751
+
1738
1752
// / Plan node used to implement aggregations over grouping sets. Duplicates
1739
1753
// / the aggregation input for each set of grouping keys. The output contains
1740
1754
// / one column for each grouping key, followed by aggregation inputs, followed
@@ -1903,6 +1917,8 @@ class GroupIdNode : public PlanNode {
1903
1917
const std::string groupIdName_;
1904
1918
};
1905
1919
1920
+ using GroupIdNodePtr = std::shared_ptr<const GroupIdNode>;
1921
+
1906
1922
class ExchangeNode : public PlanNode {
1907
1923
public:
1908
1924
ExchangeNode (
@@ -1989,6 +2005,8 @@ class ExchangeNode : public PlanNode {
1989
2005
const VectorSerde::Kind serdeKind_;
1990
2006
};
1991
2007
2008
+ using ExchangeNodePtr = std::shared_ptr<const ExchangeNode>;
2009
+
1992
2010
class MergeExchangeNode : public ExchangeNode {
1993
2011
public:
1994
2012
MergeExchangeNode (
@@ -2089,6 +2107,8 @@ class MergeExchangeNode : public ExchangeNode {
2089
2107
const std::vector<SortOrder> sortingOrders_;
2090
2108
};
2091
2109
2110
+ using MergeExchangeNodePtr = std::shared_ptr<const MergeExchangeNode>;
2111
+
2092
2112
class LocalMergeNode : public PlanNode {
2093
2113
public:
2094
2114
LocalMergeNode (
@@ -2195,6 +2215,8 @@ class LocalMergeNode : public PlanNode {
2195
2215
const std::vector<SortOrder> sortingOrders_;
2196
2216
};
2197
2217
2218
+ using LocalMergeNodePtr = std::shared_ptr<const LocalMergeNode>;
2219
+
2198
2220
// / Calculates partition number for each row of the specified vector.
2199
2221
class PartitionFunction {
2200
2222
public:
@@ -2418,6 +2440,8 @@ class LocalPartitionNode : public PlanNode {
2418
2440
const PartitionFunctionSpecPtr partitionFunctionSpec_;
2419
2441
};
2420
2442
2443
+ using LocalPartitionNodePtr = std::shared_ptr<const LocalPartitionNode>;
2444
+
2421
2445
class PartitionedOutputNode : public PlanNode {
2422
2446
public:
2423
2447
enum class Kind {
@@ -2647,6 +2671,8 @@ class PartitionedOutputNode : public PlanNode {
2647
2671
const RowTypePtr outputType_;
2648
2672
};
2649
2673
2674
+ using PartitionedOutputNodePtr = std::shared_ptr<const PartitionedOutputNode>;
2675
+
2650
2676
FOLLY_ALWAYS_INLINE std::ostream& operator <<(
2651
2677
std::ostream& out,
2652
2678
const PartitionedOutputNode::Kind kind) {
@@ -3062,6 +3088,8 @@ class HashJoinNode : public AbstractJoinNode {
3062
3088
const bool nullAware_;
3063
3089
};
3064
3090
3091
+ using HashJoinNodePtr = std::shared_ptr<const HashJoinNode>;
3092
+
3065
3093
// / Represents inner/outer/semi/anti merge joins. Translates to an
3066
3094
// / exec::MergeJoin operator. Assumes that both left and right input data is
3067
3095
// / sorted on the join keys. A separate pipeline that puts its output into
@@ -3132,6 +3160,8 @@ class MergeJoinNode : public AbstractJoinNode {
3132
3160
static PlanNodePtr create (const folly::dynamic& obj, void * context);
3133
3161
};
3134
3162
3163
+ using MergeJoinNodePtr = std::shared_ptr<const MergeJoinNode>;
3164
+
3135
3165
struct IndexLookupCondition : public ISerializable {
3136
3166
// / References to an index table column.
3137
3167
FieldAccessTypedExprPtr key;
@@ -3151,6 +3181,7 @@ struct IndexLookupCondition : public ISerializable {
3151
3181
3152
3182
virtual std::string toString () const = 0;
3153
3183
};
3184
+
3154
3185
using IndexLookupConditionPtr = std::shared_ptr<IndexLookupCondition>;
3155
3186
3156
3187
// / Represents IN-LIST index lookup condition: contains('list', 'key'). 'list'
@@ -3178,6 +3209,7 @@ struct InIndexLookupCondition : public IndexLookupCondition {
3178
3209
private:
3179
3210
void validate () const ;
3180
3211
};
3212
+
3181
3213
using InIndexLookupConditionPtr = std::shared_ptr<InIndexLookupCondition>;
3182
3214
3183
3215
// / Represents BETWEEN index lookup condition: 'key' between 'lower' and
@@ -3213,6 +3245,7 @@ struct BetweenIndexLookupCondition : public IndexLookupCondition {
3213
3245
private:
3214
3246
void validate () const ;
3215
3247
};
3248
+
3216
3249
using BetweenIndexLookupConditionPtr =
3217
3250
std::shared_ptr<BetweenIndexLookupCondition>;
3218
3251
@@ -3376,6 +3409,8 @@ class IndexLookupJoinNode : public AbstractJoinNode {
3376
3409
const std::vector<IndexLookupConditionPtr> joinConditions_;
3377
3410
};
3378
3411
3412
+ using IndexLookupJoinNodePtr = std::shared_ptr<const IndexLookupJoinNode>;
3413
+
3379
3414
// / Returns true if 'planNode' is index lookup join node.
3380
3415
bool isIndexLookupJoin (const core::PlanNode* planNode);
3381
3416
@@ -3520,6 +3555,8 @@ class NestedLoopJoinNode : public PlanNode {
3520
3555
const RowTypePtr outputType_;
3521
3556
};
3522
3557
3558
+ using NestedLoopJoinNodePtr = std::shared_ptr<const NestedLoopJoinNode>;
3559
+
3523
3560
// Represents the 'SortBy' node in the plan.
3524
3561
class OrderByNode : public PlanNode {
3525
3562
public:
@@ -3661,6 +3698,8 @@ class OrderByNode : public PlanNode {
3661
3698
const std::vector<PlanNodePtr> sources_;
3662
3699
};
3663
3700
3701
+ using OrderByNodePtr = std::shared_ptr<const OrderByNode>;
3702
+
3664
3703
class TopNNode : public PlanNode {
3665
3704
public:
3666
3705
TopNNode (
@@ -3788,6 +3827,8 @@ class TopNNode : public PlanNode {
3788
3827
const std::vector<PlanNodePtr> sources_;
3789
3828
};
3790
3829
3830
+ using TopNNodePtr = std::shared_ptr<const TopNNode>;
3831
+
3791
3832
class LimitNode : public PlanNode {
3792
3833
public:
3793
3834
// @param isPartial Boolean indicating whether Limit node generates partial
@@ -3912,6 +3953,8 @@ class LimitNode : public PlanNode {
3912
3953
const std::vector<PlanNodePtr> sources_;
3913
3954
};
3914
3955
3956
+ using LimitNodePtr = std::shared_ptr<const LimitNode>;
3957
+
3915
3958
// / Expands arrays and maps into separate columns. Arrays are expanded into a
3916
3959
// / single column, and maps are expanded into two columns (key, value). Can be
3917
3960
// / used to expand multiple columns. In this case will produce as many rows as
@@ -4069,6 +4112,8 @@ class UnnestNode : public PlanNode {
4069
4112
RowTypePtr outputType_;
4070
4113
};
4071
4114
4115
+ using UnnestNodePtr = std::shared_ptr<const UnnestNode>;
4116
+
4072
4117
// / Checks that input contains at most one row. Return that row as is. If
4073
4118
// / input is empty, returns a single row with all values set to null. If input
4074
4119
// / contains more than one row raises an exception.
@@ -4138,6 +4183,8 @@ class EnforceSingleRowNode : public PlanNode {
4138
4183
const std::vector<PlanNodePtr> sources_;
4139
4184
};
4140
4185
4186
+ using EnforceSingleRowNodePtr = std::shared_ptr<const EnforceSingleRowNode>;
4187
+
4141
4188
// / Adds a new column named `idName` at the end of the input columns
4142
4189
// / with unique int64_t value per input row.
4143
4190
// /
@@ -4244,6 +4291,8 @@ class AssignUniqueIdNode : public PlanNode {
4244
4291
std::shared_ptr<std::atomic_int64_t > uniqueIdCounter_;
4245
4292
};
4246
4293
4294
+ using AssignUniqueIdNodePtr = std::shared_ptr<const AssignUniqueIdNode>;
4295
+
4247
4296
// / PlanNode used for evaluating Sql window functions.
4248
4297
// / All window functions evaluated in the operator have the same
4249
4298
// / window spec (partition keys + order columns).
@@ -4491,6 +4540,8 @@ class WindowNode : public PlanNode {
4491
4540
const RowTypePtr outputType_;
4492
4541
};
4493
4542
4543
+ using WindowNodePtr = std::shared_ptr<const WindowNode>;
4544
+
4494
4545
// / Optimized version of a WindowNode for a single row_number function with an
4495
4546
// / optional limit and no sorting.
4496
4547
// / The output of this node contains all input columns followed by an optional
@@ -4625,6 +4676,8 @@ class RowNumberNode : public PlanNode {
4625
4676
const RowTypePtr outputType_;
4626
4677
};
4627
4678
4679
+ using RowNumberNodePtr = std::shared_ptr<const RowNumberNode>;
4680
+
4628
4681
// / The MarkDistinct operator marks unique rows based on distinctKeys.
4629
4682
// / The result is put in a new markerName column alongside the original input.
4630
4683
// / @param markerName Name of the output mask channel.
@@ -4735,6 +4788,8 @@ class MarkDistinctNode : public PlanNode {
4735
4788
const RowTypePtr outputType_;
4736
4789
};
4737
4790
4791
+ using MarkDistinctNodePtr = std::shared_ptr<const MarkDistinctNode>;
4792
+
4738
4793
// / Optimized version of a WindowNode for a single row_number function with a
4739
4794
// / limit over sorted partitions.
4740
4795
// / The output of this node contains all input columns followed by an optional
@@ -4913,6 +4968,8 @@ class TopNRowNumberNode : public PlanNode {
4913
4968
const RowTypePtr outputType_;
4914
4969
};
4915
4970
4971
+ using TopNRowNumberNodePtr = std::shared_ptr<const TopNRowNumberNode>;
4972
+
4916
4973
class PlanNodeVisitorContext {
4917
4974
public:
4918
4975
virtual ~PlanNodeVisitorContext () = default ;
0 commit comments