Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-31936 Implement ScriptTransform in sql/core
  3. SPARK-32685

Script transform hive serde default field.delimit is '\t'

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.2.0
    • SQL
    • None

    Description

       

      select split(value, "\t") from (
      SELECT TRANSFORM(a, b, c, null)
      USING 'cat' 
      FROM (select 1 as a, 2 as b, 3  as c) t
      ) temp;
      
      result is :
      _c0
      ["2","3","\\N"]

       

      select split(value, "\t") from (
      SELECT TRANSFORM(a, b, c, null)
        ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
      USING 'cat' 
        ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
        WITH SERDEPROPERTIES (
         'serialization.last.column.takes.rest' = 'true'
        )
      FROM (select 1 as a, 2 as b, 3  as c) t
      ) temp;
      
      
      result is :
      _c0
      ["2","3","\\N"]

       

       

       

      select split(value, "\t") from (
      SELECT TRANSFORM(a, b, c, null)
        ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
      USING 'cat' 
        ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
      FROM (select 1 as a, 2 as b, 3  as c) t
      ) temp;
      
      result is :
      _c0 
      ["2"]
      

       

      Attachments

        Activity

          People

            angerszhuuu angerszhu
            angerszhuuu angerszhu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: