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

BitwiseCount / bit_count generated code for boolean inputs fails to compile

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0, 3.1.3, 3.2.4, 3.5.1, 3.3.4, 3.4.3
    • 4.0.0, 3.5.2, 3.4.4
    • SQL

    Description

      If the `BitwiseCount` / `bit_count` expresison is applied to a boolean type column then then it will trigger codegen fallback to interpreted because the generated code contains invalid Java syntax, triggering errors like

       java.util.concurrent.ExecutionException: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 41, Column 11: Failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 41, Column 11: Unexpected token "if" in primary
      

      This problem was masked because the QueryTest framework may not be fully exercising codegen paths (e.g. if constant folding occurs).

      Attachments

        Issue Links

          Activity

            People

              joshrosen Josh Rosen
              joshrosen Josh Rosen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: