Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-48675

Cache table doesn't work with collated column

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0
    • SQL
    • None

    Description

      Following sequence of queries produces the error:

      >  cache lazy table t as select col from values ('a' collate utf8_lcase) as (col);
      > select col from t;
      org.apache.spark.SparkException: not support type: org.apache.spark.sql.types.StringType@1.
              at org.apache.spark.sql.errors.QueryExecutionErrors$.notSupportTypeError(QueryExecutionErrors.scala:1069)
              at org.apache.spark.sql.execution.columnar.ColumnBuilder$.apply(ColumnBuilder.scala:200)
              at org.apache.spark.sql.execution.columnar.DefaultCachedBatchSerializer$$anon$1.$anonfun$next$1(InMemoryRelation.scala:85)
              at scala.collection.immutable.List.map(List.scala:247)
              at scala.collection.immutable.List.map(List.scala:79)
              at org.apache.spark.sql.execution.columnar.DefaultCachedBatchSerializer$$anon$1.next(InMemoryRelation.scala:84)
              at org.apache.spark.sql.execution.columnar.DefaultCachedBatchSerializer$$anon$1.next(InMemoryRelation.scala:82)
              at org.apache.spark.sql.execution.columnar.CachedRDDBuilder$$anon$2.next(InMemoryRelation.scala:296)
              at org.apache.spark.sql.execution.columnar.CachedRDDBuilder$$anon$2.next(InMemoryRelation.scala:293)
      ... 

      This is also the problem on non-lazy cached tables.

      Attachments

        Activity

          People

            nikolamand-db Nikola Mandic
            nikolamand-db Nikola Mandic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: