[ https://issues.apache.org/jira/browse/SPARK-42638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17696409#comment-17696409 ]
zzzzming95 commented on SPARK-42638: ------------------------------------ Maybe we can use `insert as select` to achieve the same effect? > current_user() is blocked from VALUES, but current_timestamp() is not > --------------------------------------------------------------------- > > Key: SPARK-42638 > URL: https://issues.apache.org/jira/browse/SPARK-42638 > Project: Spark > Issue Type: Bug > Components: Spark Core > Affects Versions: 3.3.0 > Reporter: Serge Rielau > Priority: Major > > VALUES(current_user()); > returns: > cannot evaluate expression current_user() in inline table definition.; line 1 > pos 8 > > The same with current_timestamp() works. > It appears current_user() is recognized as non-deterministic. But it is > constant within the statement, just like current_timestanmp(). > PS: It's not clear why we block non-deterministic functions to begin with.... -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org