Skip to content

Binder Error: ORDER BY non-integer literal has no effect. #4294

@fuzzerofducks

Description

@fuzzerofducks

Issue found by DuckFuzz on git commit hash b3c8a using seed 648448232.

To Reproduce

create table all_types as select * exclude(small_enum, medium_enum, large_enum) from test_all_types() limit 0;
WITH t112 (c109, c110, c111) AS (SELECT NULL, NULL, NULL, NULL, 9455, NULL FROM all_types AS t52(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43, c44, c45, c46, c47, c48, c49, c50, c51) ASOF FULL JOIN test_all_types(use_large_bignum := 3735, use_large_enum := NULL) AS t56(c53, c54, c55) ON (NULL) LEFT JOIN all_types AS t108(c57, c58, c59, c60, c61, c62, c63, c64, c65, c66, c67, c68, c69, c70, c71, c72, c73, c74, c75, c76, c77, c78, c79, c80, c81, c82, c83, c84, c85, c86, c87, c88, c89, c90, c91, c92, c93, c94, c95, c96, c97, c98, c99, c100, c101, c102, c103, c104, c105, c106, c107) ON (CAST(c90 AS INTEGER[3])) ORDER BY * NULLS FIRST)SELECT DISTINCT NULL, NULL, -32768, 'd9733ed3-e28d-4a91-9843-cbc24672fdb7', NULL, NULL, NULL, NULL FROM all_types AS t164(c113, c114, c115, c116, c117, c118, c119, c120, c121, c122, c123, c124, c125, c126, c127, c128, c129, c130, c131, c132, c133, c134, c135, c136, c137, c138, c139, c140, c141, c142, c143, c144, c145, c146, c147, c148, c149, c150, c151, c152, c153, c154, c155, c156, c157, c158, c159, c160, c161, c162, c163) WHERE NULL ORDER BY NULL ASC NULLS FIRST

Error Message

Binder Error: ORDER BY non-integer literal has no effect.

Stack Trace

* SET order_by_non_integer_literal=true to allow this behavior.

LINE 1: ... c157, c158, c159, c160, c161, c162, c163) WHERE NULL ORDER BY NULL ASC NULLS FIRST
                                                                          ^

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions