[ https://issues.apache.org/jira/browse/SPARK-10442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14730657#comment-14730657 ]
Cheng Lian commented on SPARK-10442: ------------------------------------ The reason is that all non-empty strings are converted to {{true}} when casting to boolean. This behavior isn't intuitive, but it is consistent with Hive. I'm not sure whether we want to change this. PostgreSQL only allows string literals {{'true'}} and {{'false'}} to be casted to boolean (case insensitive), casting any other strings to boolean results in error. > select cast('false' as boolean) returns true > -------------------------------------------- > > Key: SPARK-10442 > URL: https://issues.apache.org/jira/browse/SPARK-10442 > Project: Spark > Issue Type: Bug > Components: SQL > Reporter: Yin Huai > Priority: Critical > -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org