dtenedor commented on code in PR #52987:
URL: https://github.com/apache/spark/pull/52987#discussion_r2528493312
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -6577,16 +6577,22 @@ class AstBuilder extends DataTypeAstBuilder
private def visitOperatorPipeRightSide(
ctx: OperatorPipeRightSideContext, left: LogicalPlan): LogicalPlan = {
- if (!SQLConf.get.getConf(SQLConf.OPERATOR_PIPE_SYNTAX_ENABLED)) {
+ if (!conf.getConf(SQLConf.OPERATOR_PIPE_SYNTAX_ENABLED)) {
operationNotAllowed("Operator pipe SQL syntax using |>", ctx)
}
Option(ctx.selectClause).map { c =>
+ // Check if GROUP BY is used with pipe SELECT when the config is disabled
+ if (ctx.aggregationClause != null &&
!conf.pipeOperatorAllowAggregateInSelect) {
+ operationNotAllowed(
+ "|> SELECT with a GROUP BY clause is not allowed when " +
+ "spark.sql.allowAggregateInSelectWithPipeOperator is disabled", ctx)
Review Comment:
I had the chance to speak with Wenchen in person about this -- it is a good
point, the config doesn't really help in any scenarios here. I will remove it.
--
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]