marvelshan opened a new pull request, #4660: URL: https://github.com/apache/datafusion-comet/pull/4660
## Which issue does this PR close? Closes #4575 ## Rationale for this change `CometFromUnixTime` incorrectly reports non-default datetime format patterns as `Incompatible` instead of `Unsupported`. This is misleading because: - `Incompatible` implies the expression can run natively if the user opts in via `spark.comet.expr.allowIncompatible=true`, but non-default formats **cannot be executed natively at all** — the `convert()` method returns `None` for them regardless of configuration. - The `GenerateDocs` tool uses `getIncompatibleReasons()` and `getUnsupportedReasons()` to produce the public Compatibility Guide. Classifying format limitations as "incompatible" misleads users into thinking they can enable support by setting `allowIncompatible=true`. - This was identified as item #3 in #4074, which tracks expression support-level misclassifications discovered during the docs generation work in #4067. ## What changes are included in this PR? - Split `getIncompatibleReasons()` to only contain the timestamp range difference (which is a true incompatibility — native can execute but results may differ at boundaries) - Added `getUnsupportedReasons()` to document format pattern limitations (native cannot execute these at all) - Updated `getSupportLevel(expr)` to dynamically return `Unsupported` for non-default format patterns and `Incompatible` for the default pattern, matching the actual behavior in `convert()` ## How are these changes tested? Existing tests cover the fallback behavior. The `convert()` method already returns `None` for non-default formats, and `getSupportLevel()` now aligns with that behavior. The `GenerateDocs` output will correctly classify format limitations under "Unsupported" rather than "Incompatible". -- 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]
