[ 
https://issues.apache.org/jira/browse/ARROW-16860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17563214#comment-17563214
 ] 

Jeroen van Straten commented on ARROW-16860:
--------------------------------------------

> Start with an empty ExtensionSet

I think the original idea was to allow passing an existing ExtensionSet as 
well, such that when you're truly round-tripping, you can use the original 
ExtensionSet to get exactly the same anchors, URIs, and so on (except, I think, 
the order in which the extensions are declared, which is completely arbitrary 
as far as Substrait is concerned... so it still wouldn't be a perfect round 
trip unless the incoming plan defines them in the "correct" order or we would 
also track the order). Either way, though, the various ToProto calls should add 
missing extensions to the ExtensionSet as needed, so this doesn't change 
anything aside from adding an optional argument to SerializePlan.

Perfect round-tripping is in general almost impossible though, and I stand by 
it being a bad idea to even try, because it would give very suboptimal plans at 
the Acero side even if the incoming Substrait plan is optimized (see 
ARROW-16986). I'd suggest introducing a conversion option that selects how 
strict the converter should be about maintaining structure and meta-information 
loss (see ARROW-16988).

> [C++] Add Roundtrip Support to Plans
> ------------------------------------
>
>                 Key: ARROW-16860
>                 URL: https://issues.apache.org/jira/browse/ARROW-16860
>             Project: Apache Arrow
>          Issue Type: Improvement
>            Reporter: Vibhatha Lakmal Abeykoon
>            Assignee: Vibhatha Lakmal Abeykoon
>            Priority: Major
>              Labels: substrait
>
> Convert an ACERO plan to a Substrait plan. The missing component is to add 
> `ToProto` function to convert an ACERO `ExecPlan` to a Substrait-Plan.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to