liyafan82 commented on pull request #7748: URL: https://github.com/apache/arrow/pull/7748#issuecomment-658658261
> This can't be merged yet. Divide by zero in the unchecked case causes SIGFPE process crash. > > We should probably return null when dividing by zero, this is what Impala does > > https://github.com/apache/impala/blob/b5805de3e65fd1c7154e4169b323bb38ddc54f4f/be/src/exprs/operators-ir.cc#L60 > > I'm curious what other database-type systems do I made some initial investigations, and it shows that some systems return null upon divide by zero (e.g. Impala and Hive (https://stackoverflow.com/questions/41165708/hive-dividing-numbers-from-the-same-column)), while others returns an error (like MySQL (https://www.got-it.ai/solutions/sqlquerychat/sql-help/data-manipulation/mysql-divide-by-zero-error-querychat/) and SQL Server (https://stackoverflow.com/questions/23230041/how-to-protect-sql-statement-from-divide-by-zero-error/23230084)) Anyway, we should handle it, instead of letting the process crash. ---------------------------------------------------------------- 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: us...@infra.apache.org