[ 
https://issues.apache.org/jira/browse/SPARK-40223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yuming Wang updated SPARK-40223:
--------------------------------
    Description: 
How to reproduce this issue:
{code:scala}
  test("Test update stats with locale tr") {
    withSQLConf(SQLConf.CASE_SENSITIVE.key -> "true",
      SQLConf.AUTO_SIZE_UPDATE_ENABLED.key -> "true") {
      withLocale("tr") {
        val tabName = "tAb_I"
        withTable(tabName) {
          sql(s"CREATE TABLE $tabName(col_I int)")
          sql(s"INSERT OVERWRITE TABLE $tabName SELECT 1")
        }
      }
    }
  }
{code}

Error:
{noformat}
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [tab_ı]: is not a 
valid table name
        at 
org.apache.hadoop.hive.ql.metadata.Table.checkValidity(Table.java:192)
        at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:623)
        at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:612)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
{noformat}



  was:
How to reproduce this issue:
{code:scala}
  test("Test update stats with locale tr") {
    withSQLConf(SQLConf.CASE_SENSITIVE.key -> "true",
      SQLConf.AUTO_SIZE_UPDATE_ENABLED.key -> "true") {
      withLocale("tr") {
        val tabName = "tAb_I"
        withTable(tabName) {
          sql(s"CREATE TABLE $tabName(col_I int) USING PARQUET")
          sql(s"INSERT OVERWRITE TABLE $tabName SELECT 1")
        }
      }
    }
  }
{code}

Error:
{noformat}
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [tab_ı]: is not a 
valid table name
        at 
org.apache.hadoop.hive.ql.metadata.Table.checkValidity(Table.java:192)
        at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:623)
        at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:612)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
{noformat}




> Cannot alter table with locale tr
> ---------------------------------
>
>                 Key: SPARK-40223
>                 URL: https://issues.apache.org/jira/browse/SPARK-40223
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: Yuming Wang
>            Priority: Major
>
> How to reproduce this issue:
> {code:scala}
>   test("Test update stats with locale tr") {
>     withSQLConf(SQLConf.CASE_SENSITIVE.key -> "true",
>       SQLConf.AUTO_SIZE_UPDATE_ENABLED.key -> "true") {
>       withLocale("tr") {
>         val tabName = "tAb_I"
>         withTable(tabName) {
>           sql(s"CREATE TABLE $tabName(col_I int)")
>           sql(s"INSERT OVERWRITE TABLE $tabName SELECT 1")
>         }
>       }
>     }
>   }
> {code}
> Error:
> {noformat}
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [tab_ı]: is not 
> a valid table name
>       at 
> org.apache.hadoop.hive.ql.metadata.Table.checkValidity(Table.java:192)
>       at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:623)
>       at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:612)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:498)
> {noformat}



--
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

Reply via email to