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

Codegen compilation error when using split_part

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.3.1, 3.4.0
    • SQL
    • None

    Description

      The following query throws an error:

      create or replace temp view v1 as
      select * from values
      ('11.12.13', '.', 3)
      as v1(col1, col2, col3);
      
      cache table v1;
      
      SELECT split_part(col1, col2, col3)
      from v1;
      

      The error is:

      22/08/19 14:25:14 ERROR CodeGenerator: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 42, Column 1: Expression "project_isNull_0 = false" is not a type
      org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 42, Column 1: Expression "project_isNull_0 = false" is not a type
      	at org.codehaus.janino.Java$Atom.toTypeOrCompileException(Java.java:3934)
      	at org.codehaus.janino.Parser.parseBlockStatement(Parser.java:1887)
      	at org.codehaus.janino.Parser.parseBlockStatements(Parser.java:1811)
      	at org.codehaus.janino.Parser.parseBlock(Parser.java:1792)
      	at 
      

      In the end, split_part does successfully execute, although in interpreted mode.

      Attachments

        Activity

          People

            yumwang Yuming Wang
            bersprockets Bruce Robbins
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: