MCPcopy Create free account
hub / github.com/apache/arrow / FieldsInExpression

Function FieldsInExpression

cpp/src/arrow/compute/expression.cc:813–826  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

811} // namespace
812
813std::vector<FieldRef> FieldsInExpression(const Expression& expr) {
814 if (expr.literal()) return {};
815
816 if (auto ref = expr.field_ref()) {
817 return {*ref};
818 }
819
820 std::vector<FieldRef> fields;
821 for (const Expression& arg : CallNotNull(expr)->arguments) {
822 auto argument_fields = FieldsInExpression(arg);
823 std::move(argument_fields.begin(), argument_fields.end(), std::back_inserter(fields));
824 }
825 return fields;
826}
827
828bool ExpressionHasFieldRefs(const Expression& expr) {
829 if (expr.literal()) return false;

Callers 9

MaterializedFieldsMethod · 0.85
FilterMethod · 0.85
TestRowGroupsMethod · 0.85
TEST_PFunction · 0.85
CollectFilterColumnsMethod · 0.85
TESTFunction · 0.85

Calls 5

CallNotNullFunction · 0.85
literalMethod · 0.80
field_refMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by 3

TestRowGroupsMethod · 0.68
TEST_PFunction · 0.68
TESTFunction · 0.68