You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Rion Williams (Jira)" <ji...@apache.org> on 2026/02/14 21:31:00 UTC
[jira] [Commented] (FLINK-39089) [SQL] Enhanced projection field alias display
[ https://issues.apache.org/jira/browse/FLINK-39089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18058688#comment-18058688 ]
Rion Williams commented on FLINK-39089:
---------------------------------------
[~averyzhang]
This seems like an excellent quality-of-life improvement — thanks for proposing it! I took a glance over the initial PR and left a comment.
Please let me know if you’d like any additional help with the effort (or any of the other related QoL improvements). Happy to help!
> [SQL] Enhanced projection field alias display
> ---------------------------------------------
>
> Key: FLINK-39089
> URL: https://issues.apache.org/jira/browse/FLINK-39089
> Project: Flink
> Issue Type: New Feature
> Components: Table SQL / Planner
> Reporter: featzhang
> Priority: Major
> Labels: pull-request-available
>
> Currently, in Flink SQL's EXPLAIN output, LogicalProject nodes display field references using positional indices like {{{}$0{}}}, {{{}$1{}}}, which makes the execution plan difficult to read and understand. For example:
> {code:java}
> LogicalProject($0, $2)
> {code}
> This PR enhances the projection explain output to show actual field names and their sources, making it more readable:
> {code:java}
> LogicalProject(id, user_name)
> {code}
> Or with more detail:
> {code:java}
> Project:
> id := orders.id
> user_name := users.name
> {code}
> h2. Brief change log
> * Added {{projectFieldsToString}} method in {{RelExplainUtil}} to format projection fields with readable field names
> * The new method converts field references from positional indices ($0, $1) to actual field names with proper aliasing
> * Maintained backward compatibility - the utility method is available for future integration
> * Successfully compiled and tested with the flink-table-planner module
> h2. Verifying this change
> This change can be verified by:
> # Running existing explain tests to ensure no regression
> # Adding new test cases that verify enhanced projection alias display
> # Manual testing with SQL queries containing projections:
> {code:sql}
> EXPLAIN SELECT id, user_name FROM orders;
> {code}
> Expected output should show field names instead of positional indices.
> h2. Does this pull request potentially affect one of the following parts:
> * Dependencies (does it add or upgrade a dependency): *no*
> * The public API, i.e., is any changed class annotated with {{{}@Public(Evolving){}}}: *no*
> * The serializers: *no*
> * The runtime per-record code paths (performance sensitive): *no*
> * Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: *no*
> * The S3 file system connector: *no*
> h2. Documentation
> * Does this pull request introduce a new feature? *yes*
> * If yes, how is the feature documented? *code comments and JavaDocs*
--
This message was sent by Atlassian Jira
(v8.20.10#820010)