bkietz commented on a change in pull request #9323: URL: https://github.com/apache/arrow/pull/9323#discussion_r581079314
########## File path: cpp/src/arrow/dataset/expression.cc ########## @@ -698,16 +701,25 @@ Status ExtractKnownFieldValuesImpl( return !(ref && lit); } + if (call->function_name == "is_null") { + auto ref = call->arguments[0].field_ref(); + return !ref; + } + return true; }); for (auto it = unconsumed_end; it != conjunction_members->end(); ++it) { auto call = CallNotNull(*it); - auto ref = call->arguments[0].field_ref(); - auto lit = call->arguments[1].literal(); - - known_values->emplace(*ref, *lit); + if (call->function_name == "equal") { + auto ref = call->arguments[0].field_ref(); + auto lit = call->arguments[1].literal(); + known_values->emplace(*ref, *lit); + } else if (call->function_name == "is_null") { + auto ref = call->arguments[0].field_ref(); + known_values->emplace(*ref, std::make_shared<NullScalar>()); Review comment: It looks like gcc 4.8's `emplace` isn't clever enough to figure this out: https://github.com/apache/arrow/pull/9323/checks?check_run_id=1957359093#step:9:1151 ```suggestion known_values->emplace(*ref, Datum(std::make_shared<NullScalar>())); ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org