jacktengg commented on issue #56436:
URL: https://github.com/apache/doris/issues/56436#issuecomment-3383761361

   查询计划中把join等值条件的column cast成了double,导致比较结果不精确:
   ```
   Explain String(Nereids Planner)
   PLAN FRAGMENT 0
     OUTPUT EXPRS:
       job_number[#51]
       id[#52]
       org_id[#53]
     PARTITION: UNPARTITIONED
   
     HAS_COLO_PLAN_NODE: false
   
     VRESULT SINK
        MYSQL_PROTOCAL
   
     5:VEXCHANGE
        offset: 0
        distribute expr lists: 
   
   PLAN FRAGMENT 1
   
     PARTITION: HASH_PARTITIONED: expr_cast(id as DOUBLE)[#45]
   
     HAS_COLO_PLAN_NODE: false
   
     STREAM DATA SINK
       EXCHANGE ID: 05
       UNPARTITIONED
   
     4:VHASH JOIN(401)
     |  join op: RIGHT OUTER JOIN(PARTITIONED)[]
     |  equal join conjunct: (expr_cast(id as DOUBLE)[#45] = expr_cast(org_id 
as DOUBLE)[#26])
     |  runtime filters: RF000[min_max] <- expr_cast(org_id as 
DOUBLE)[#26](1/1/1048576), RF001[in_or_bloom] <- expr_cast(org_id as 
DOUBLE)[#26](1/1/1048576)
     |  cardinality=1
     |  vec output tuple id: 5
     |  output tuple id: 5
     |  vIntermediate tuple ids: 4 
     |  hash output slot ids: 24 25 44 
     |  final projections: job_number[#48], id[#46], org_id[#49]
     |  final project output tuple id: 5
     |  distribute expr lists: expr_cast(id as DOUBLE)[#45]
     |  distribute expr lists: expr_cast(org_id as DOUBLE)[#26]
     |  
     |----1:VEXCHANGE
     |       offset: 0
     |       distribute expr lists: 
     |    
     3:VEXCHANGE
        offset: 0
        distribute expr lists: id[#44]
   
   PLAN FRAGMENT 2
   
     PARTITION: HASH_PARTITIONED: id[#27]
   
     HAS_COLO_PLAN_NODE: false
   
     STREAM DATA SINK
       EXCHANGE ID: 03
       HASH_PARTITIONED: expr_cast(id as DOUBLE)[#45]
   
     2:VOlapScanNode(365)
        TABLE: test.jdp_bus_sell_org(jdp_bus_sell_org), PREAGGREGATION: ON
        PREDICATES: (__DORIS_DELETE_SIGN__[#42] = 0)
        runtime filters: RF000[min_max] -> CAST(id[#27] AS double), 
RF001[in_or_bloom] -> CAST(id[#27] AS double)
        partitions=1/1 (jdp_bus_sell_org)
        tablets=10/10, tabletList=1759973236331,1759973236333,1759973236335 ...
        cardinality=2, avgRowSize=26470.0, numNodes=1
        pushAggOp=NONE
        final projections: id[#27], CAST(id[#27] AS double)
        final project output tuple id: 3
   
   PLAN FRAGMENT 3
   
     PARTITION: HASH_PARTITIONED: id[#0]
   
     HAS_COLO_PLAN_NODE: false
   
     STREAM DATA SINK
       EXCHANGE ID: 01
       HASH_PARTITIONED: expr_cast(org_id as DOUBLE)[#26]
   
     0:VOlapScanNode(381)
        TABLE: test.jsm_salesman(jsm_salesman), PREAGGREGATION: ON
        PREDICATES: ((job_number[#2] = '2008092') AND 
(__DORIS_DELETE_SIGN__[#22] = 0))
        partitions=1/1 (jsm_salesman)
        tablets=10/10, tabletList=1759973236308,1759973236310,1759973236312 ...
        cardinality=1, avgRowSize=37205.0, numNodes=1
        pushAggOp=NONE
        final projections: job_number[#2], org_id[#5], CAST(org_id[#5] AS 
double)
        final project output tuple id: 1
   
   
   
   ========== STATISTICS ==========
   planed with unknown column statistics
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to