andygrove commented on code in PR #4086: URL: https://github.com/apache/datafusion-comet/pull/4086#discussion_r3150608044
########## docs/source/user-guide/latest/understanding-comet-plans.md: ########## @@ -0,0 +1,232 @@ +<!--- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +# Understanding Comet Plans + +This guide explains how to read a Spark query plan once Comet is enabled, what +happens when parts of a plan fall back to Spark, and which configs to use to +inspect that behavior. + +## Overview + +When Comet is enabled, the `CometSparkSessionExtensions` rules walk the +physical plan bottom-up and replace Spark operators with Comet equivalents +where possible. Consecutive native operators are combined into a single block +that is serialized as protobuf and executed by DataFusion on the executor. +Operators that Comet does not support remain as their original Spark form. + +As a result, a plan can mix three kinds of nodes: + +- **`Comet*` nodes** that run natively in Rust (for example `CometProject`, Review Comment: The LLMs all know about the current names though, so it could be confusing to rename at this point. Some of the JVM nodes also involve native code, so it is more Hybrid. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
