Skip to content

[Bug]: multiple substring function result bug #3169

Closed

Description

@dengn

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93):e1319c52cf87b17a98008ae0dda79b72237d9ed1
- Hardware parameters:Mac M1 ARM 16GB Memory
- OS type:OSX
- Others:

Actual Behavior

substr(c1, -2147483647, 2147483648)
111
222

substring(hello, 1, 18446744073709551615)
hell

substring(hello, -18446744073709551615, -18446744073709551615)
h

Expected Behavior

substr(c1, -2147483647, 2147483648)
empty set

substring('hello', 1, 18446744073709551615)
hello

substring(hello, -18446744073709551615, -18446744073709551615)
empty set

Steps to Reproduce

CREATE TABLE t1(c1 CHAR(30));
INSERT INTO t1 VALUES('111'),('222');
SELECT DISTINCT substr(c1, -2147483647, 2147483648) FROM t1;


select substring('hello', 1, 18446744073709551615);

select substring('hello', -18446744073709551615, -18446744073709551615);

Additional information

No response

Activity

  1. added
    kind/bug
    on Jun 21, 2022
  2. added this to the v0.5.0 milestone on Jun 21, 2022
  3. changed the title [-][Bug]: substring function result bug[/-] [+][Bug]: multiple substring function result bug[/+] on Jun 21, 2022
  4. added
    bvt
    on Jun 24, 2022
  5. dengn commented on Jun 30, 2022

    @dengn
    ContributorAuthor

    #3169 tag still remains in the test case.

  6. assigned and unassigned on Jun 30, 2022
  7. jianwan0214 commented on Jul 1, 2022

    @jianwan0214
    Contributor

    select substring('hello', -18446744073709551615, -18446744073709551615);
    this error is tracked by issue #3155.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bvtkind/bugtriage/accepted

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions