Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6348

ARRAY_OVERLAP with a NULL argument crashes the compiler

    XMLWordPrintableJSON

Details

    Description

      The following SqlOperatorTest:

          f.checkScalar("arrays_overlap(null, null)", true,
              "NULL");
      

      causes a crash:

      	at java.base/java.util.Objects.requireNonNull(Objects.java:222)
      	at org.apache.calcite.sql.type.SqlTypeTransforms.lambda$static$6(SqlTypeTransforms.java:124)
      	at org.apache.calcite.sql.type.SqlTypeTransformCascade.inferReturnType(SqlTypeTransformCascade.java:66)
      	at org.apache.calcite.sql.SqlOperator.inferReturnType(SqlOperator.java:534)
      	at org.apache.calcite.sql.SqlOperator.validateOperands(SqlOperator.java:503)
      	at org.apache.calcite.sql.SqlFunction.deriveType(SqlFunction.java:347)
      	at org.apache.calcite.sql.SqlFunction.deriveType(SqlFunction.java:231)
      	at org.apache.calcite.sql.validate.SqlValidatorImpl$DeriveTypeVisitor.visit(SqlValidatorImpl.java:6714)
      

      This issue is similar to CALCITE-6283

      Attachments

        Issue Links

          Activity

            People

              mbudiu Mihai Budiu
              mbudiu Mihai Budiu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: