Skip to content

[Bug]: select return result is incorrect which where filter condition is unique index  #19108

Closed

Description

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

07b514c

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

o_custkey为唯一索引,where后过滤值为unique key返回值不对
企业微信截图_8d7d7b35-bfef-44c0-8521-24d4fcece341

orders ddl:
CREATE TABLE orders (
O_ORDERKEY bigint NOT NULL,
O_CUSTKEY int NOT NULL,
O_ORDERSTATUS char(1) NOT NULL,
O_TOTALPRICE decimal(15,2) NOT NULL,
O_ORDERDATE date NOT NULL,
O_ORDERPRIORITY char(15) NOT NULL,
O_CLERK char(15) NOT NULL,
O_SHIPPRIORITY int NOT NULL,
O_COMMENT varchar(79) NOT NULL,
PRIMARY KEY (O_ORDERKEY),
UNIQUE KEY o_custkey (O_CUSTKEY)
)

Expected Behavior

No response

Steps to Reproduce

CREATE TABLE `orders` (
  `O_ORDERKEY` bigint NOT NULL,
  `O_CUSTKEY` int NOT NULL,
  `O_ORDERSTATUS` char(1) NOT NULL,
  `O_TOTALPRICE` decimal(15,2) NOT NULL,
  `O_ORDERDATE` date NOT NULL,
  `O_ORDERPRIORITY` char(15) NOT NULL,
  `O_CLERK` char(15) NOT NULL,
  `O_SHIPPRIORITY` int NOT NULL,
  `O_COMMENT` varchar(79) NOT NULL,
  PRIMARY KEY (`O_ORDERKEY`),
  UNIQUE KEY `o_custkey` (`O_CUSTKEY`)
)
load data url s3option {'endpoint'='http://minio.minio-mo.svc.cluster.local','access_key_id'='xxx','secret_access_key'='xxx','bucket'='mo-load-data', 'filepath'='tpch_100/orders.tbl'} into table orders fields terminated by '|' lines terminated by '\n' parallel 'true';
select O_ORDERKEY,O_CUSTKEY from orders where O_CUSTKEY in (4);
select O_ORDERKEY,O_CUSTKEY from orders where O_ORDERKEY =544949286;

Additional information

No response

Activity

  1. ghost added
    kind/bug
    on Sep 30, 2024
  2. ghost added
    severity/s0
    on Sep 30, 2024
  3. ghost added this to the 1.3.0 milestone on Sep 30, 2024
  4. badboynt1 commented on Sep 30, 2024

    @badboynt1
    Contributor

    因为load时不去重,导致unique约束失效,数据出错。

  5. Repository owner unassigned on Oct 18, 2024
  6. jensenojs commented on Oct 23, 2024

    @jensenojs
    Contributor

    no process

  7. 14 remaining items

  8. huby2358 commented on Dec 3, 2024

    @huby2358
    Contributor

    无

  9. huby2358 commented on Dec 12, 2024

    @huby2358
    Contributor

    提的pr会导致tke tech load超时严重,还需要定位

  10. huby2358 commented on Dec 17, 2024

    @huby2358
    Contributor

    同上,暂时没投入

  11. huby2358 commented on Dec 23, 2024

    @huby2358
    Contributor

    未投入

  12. huby2358 commented on Dec 26, 2024

    @huby2358
    Contributor

    未投入

  13. huby2358 commented on Dec 31, 2024

    @huby2358
    Contributor

    未投入

  14. huby2358 commented on Jan 5, 2025

    @huby2358
    Contributor

    之前提的pr,load 走去重后,会有卡住和oom问题,卡住的问题找到必现的场景,可以避免,卡住的原因还没定位出来,目前看到是dispatch在多cn场景下卡住了,merge和dispatch互相在等,oom的问题抓了下面malloc的profile, 看起来是会同时最shufflebuild, 由于load的这个文件很大,这块流程代码不熟还要再看一下。
    image

  15. huby2358 commented on Jan 5, 2025

    @huby2358
    Contributor

    卡住的堆栈
    企业微信截图_bb931c10-2978-4f0f-8caa-ef2b4f67f9fe
    企业微信截图_2abcb13b-f17c-45e8-b886-c38efa58cdc8

  16. huby2358 commented on Jan 10, 2025

    @huby2358
    Contributor

    oom的定位还需要定位

  17. huby2358 commented on Jan 16, 2025

    @huby2358
    Contributor

    同上

  18. huby2358 commented on Jan 21, 2025

    @huby2358
    Contributor

    同上

  19. huby2358 commented on Jan 24, 2025

    @huby2358
    Contributor

    正在定位,在oom 内存占用比较多的地方,打日志,对于load2G多的文件, 下图这里分配的内存不到4G, top峰值有20多G,

    Image Image 这里load的行数也是能对上的。 这里内存感觉有点对不上,这里是在深圳机器跑的。
  20. huby2358 commented on Jan 24, 2025

    @huby2358
    Contributor

    Image
    这是之前在129跑抓的,这上面内存扩张更明显,今天尝试在129跑一次,抓一下日志, 但是oom导致129挂了,现在连不上

  21. fengttt commented on Apr 25, 2025

    @fengttt
    Contributor

    The later discussion has nothing to do with the original problem any more. Close. OOM should file new bug.

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

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions