Israelobuk commented on code in PR #56856:
URL: https://github.com/apache/spark/pull/56856#discussion_r3520580062
##########
examples/src/main/python/sql/basic.py:
##########
@@ -68,14 +68,14 @@ def basic_df_example(spark: SparkSession) -> None:
# +-------+
# Select everybody, but increment the age by 1
- df.select(df['name'], df['age'] + 1).show()
- # +-------+---------+
- # | name|(age + 1)|
- # +-------+---------+
- # |Michael| null|
- # | Andy| 31|
- # | Justin| 20|
- # +-------+---------+
+ df.select(df['name'], (df['age'] + 1).alias("age_plus_one")).show()
Review Comment:
I did not consider that the Python, Scala, Java, and R examples are meant to
stay aligned across tabs.
I’m happy to either revert/close this PR to keep the examples consistent
as-is, or update the PR to apply the same explicit alias across all four
examples if maintainers prefer that direction.
--
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]