leanken commented on pull request #29983: URL: https://github.com/apache/spark/pull/29983#issuecomment-706465011
> Really, we need to return 0.0 in the case? Looks PostgreSQL/MySQL returns null instead; > > ``` > mysql> create table t (v float8); > mysql> insert into t values (1.0); > mysql> SELECT stddev_samp(v) FROM t; > +----------------+ > | stddev_samp(v) | > +----------------+ > | NULL | > +----------------+ > 1 row in set (0.00 sec) > > > postgres=# create table t (v float8); > postgres=# insert into t values (1.0); > INSERT 0 1 > postgres=# \pset null 'null' > Null display is "null". > postgres=# SELECT stddev_samp(v) FROM t; > stddev_samp > ------------- > null > (1 row) > ``` let me find more doc and see if returning null meet the TPCDS answer Q39. reply you later. ---------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
