This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch branch-1.5
in repository https://gitbox.apache.org/repos/asf/sedona.git
The following commit(s) were added to refs/heads/branch-1.5 by this push:
new 39119efb8 [SEDONA-555] Snowflake Native App should not always create a
new role (#1401)
39119efb8 is described below
commit 39119efb8c6952a62179da14bea962fe32e45afe
Author: Jia Yu <[email protected]>
AuthorDate: Tue May 7 19:27:55 2024 -0700
[SEDONA-555] Snowflake Native App should not always create a new role
(#1401)
---
.../main/java/org/apache/sedona/snowflake/snowsql/ddl/DDLGenerator.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/snowflake/src/main/java/org/apache/sedona/snowflake/snowsql/ddl/DDLGenerator.java
b/snowflake/src/main/java/org/apache/sedona/snowflake/snowsql/ddl/DDLGenerator.java
index ccbd0084c..dc60890c4 100644
---
a/snowflake/src/main/java/org/apache/sedona/snowflake/snowsql/ddl/DDLGenerator.java
+++
b/snowflake/src/main/java/org/apache/sedona/snowflake/snowsql/ddl/DDLGenerator.java
@@ -81,7 +81,7 @@ public class DDLGenerator {
}
stageName = "";
System.out.println("-- Generating DDL for Snowflake Native App");
- System.out.println("CREATE APPLICATION ROLE " + appRoleName + ";");
+ System.out.println("CREATE APPLICATION ROLE IF NOT EXISTS " +
appRoleName + ";");
System.out.println("CREATE OR ALTER VERSIONED SCHEMA sedona;");
System.out.println("GRANT USAGE ON SCHEMA sedona TO APPLICATION
ROLE " + appRoleName + ";");
}