maropu commented on a change in pull request #25831: [SPARK-29122][SQL] 
Propagate all the SQL conf to executors in SQLQueryTestSuite
URL: https://github.com/apache/spark/pull/25831#discussion_r325977725
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala
 ##########
 @@ -606,7 +606,7 @@ case class NTile(buckets: Expression) extends 
RowNumberLike with SizeBasedWindow
     zero,
     zero,
     zero,
-    (n / buckets).cast(IntegerType),
+    (n.cast(DecimalType.IntDecimal) / 
buckets.cast(DecimalType.IntDecimal)).cast(IntegerType),
 
 Review comment:
   `DeclarativeAggregate` (e.g., `updateExpressions`) uses DSLs 
`org.apache.spark.sql.catalyst.dsl._` in many places. IIUC these DSLs are 
assumed to be checked by the analyzer (e.g., type coercion), but some DSLs in 
`DeclarativeAggregate` are evaluated directly without the analyzer check. I 
personally think this is error-prone...

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to