Mihai Budiu created CALCITE-6736:
------------------------------------

             Summary: Validator accepts comparisons between arrays without 
regard to element types
                 Key: CALCITE-6736
                 URL: https://issues.apache.org/jira/browse/CALCITE-6736
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.38.0
            Reporter: Mihai Budiu


The validator rejects this comparison (taken from SqlValidatorTest):

{code{
   expr("^x'a4'=1^")
       .fails("(?s).*Cannot apply '=' to arguments of type '<BINARY.1.> = 
<INTEGER>'.*");
{code}

But happily accepts this comparison:

{code}
   expr("array[x'e4'] <> array[1]")
       .ok();
{code}

The validator should reject comparisons between arrays whose element types are 
not comparable.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to