Skip to content

after create index , query result is error  #10078

@ldeng76

Description

@ldeng76

What happens?

Inconsistent execution results of the same statement before and after table indexing。

To Reproduce

  1. start DuckDB on a persistent database file
  2. create table :
    CREATE TABLE if not exists org_match_demoerror (
          id integer  ,
          sour_sys_id1 integer,
          imp_id1 INTEGER , 
          sour_sys_id2 integer,
          imp_id2 INTEGER ,
          uni_orgid integer , 
          policy_ids  INTEGER[] ,
          ori_uni_orgid integer default '-1' , 
          blocked integer DEFAULT '0' 
        );
  3. INSERT into org_match_demoerror select * from read_csv('org_match_1.csv', delim = ',', header = true,AUTO_DETECT=TRUE) ;
  4. execute query :
    SELECT id,imp_id1 from org_match_demoerror where id = 5106912;  
    result is :
         id                 imp_id1
       5106912	214643
    
  5. create index :
       CREATE INDEX if not exists org_match_demoerror_idx0 ON org_match_demoerror (id);
  6. re execute query :
       SELECT id,imp_id1 from org_match_demoerror where id = 5106912;  
       result is :
         id                 imp_id1
       5106912	212536
    
  7. look , the imp_id1 field value change to 212536 , original values is 214643

OS:

win11

DuckDB Version:

0.9.2

DuckDB Client:

dbckdb cli

Full Name:

gary deng

Affiliation:

bp

Have you tried this on the latest main branch?

I have tested with a release build (and could not test with a main build)

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • Yes, I have

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