wjones127 commented on code in PR #13088:
URL: https://github.com/apache/arrow/pull/13088#discussion_r868255131


##########
cpp/src/arrow/dataset/dataset.cc:
##########
@@ -202,11 +202,7 @@ Result<FragmentIterator> 
InMemoryDataset::GetFragmentsImpl(compute::Expression)
 
   auto create_fragment =
       [schema](std::shared_ptr<RecordBatch> batch) -> 
Result<std::shared_ptr<Fragment>> {
-    if (!batch->schema()->Equals(schema)) {
-      return Status::TypeError("yielded batch had schema ", *batch->schema(),
-                               " which did not match InMemorySource's: ", 
*schema);
-    }
-
+    RETURN_NOT_OK(CheckProjectable(*schema, *batch->schema()));

Review Comment:
   I thought about that, but would have to change this to a `::Make()` method 
and didn't want to go that far here.



-- 
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