nbeeee commented on issue #7902:
URL: https://github.com/apache/hudi/issues/7902#issuecomment-1429275756

   > 
   sql:
   SELECT
        trim(compid) company_id
        ,trim(busno) business_id
        ,trim(wareid) ware_id
        ,if(sumqty = '', null, cast(sumqty as decimal(20,4))) as sumqty
        ,autocomputemaxstore
        ,autocomputeminstore
        ,if(maxday = '', null, cast(maxday as decimal(20,4))) as maxday
        ,if(minday = '', null, cast(minday as decimal(20,4))) as minday
        ,if(maxstore = '', null, cast(maxstore as decimal(20,4))) as maxstore
        ,if(minstore = '', null, cast(minstore as decimal(20,4))) as minstore
        ,if(storepurprice = '', null, cast(storepurprice as decimal(20,4))) as 
storepurprice
        ,if(lastmdistqty = '', null, cast(lastmdistqty as decimal(20,4))) as 
lastmdistqty
        ,autodistapply
        ,if(lastm2qty = '', null, cast(lastm2qty as decimal(20,4))) as lastm2qty
        ,if(lastm3qty = '', null, cast(lastm3qty as decimal(20,4))) as lastm3qty
        ,if(lastmqty = '', null, cast(lastmqty as decimal(20,4))) as lastmqty
        ,if(lastyqty = '', null, cast(lastyqty as decimal(20,4))) as lastyqty
        ,oosdays
        ,if(sumawaitqty = '', null, cast(sumawaitqty as decimal(20,4))) as 
sumawaitqty
        ,if(sumpendingqty = '', null, cast(sumpendingqty as decimal(20,4))) as 
sumpendingqty
        ,if(sumawaitqty_nobatch = '', null, cast(sumawaitqty_nobatch as 
decimal(20,4))) as sumawaitqty_nobatch
        ,lastsaledate
        ,if(lastapplyqty = '', null, cast(lastapplyqty as decimal(20,4))) as 
lastapplyqty
        ,lastapplydate
        ,if(lastdistqty = '', null, cast(lastdistqty as decimal(20,4))) as 
lastdistqty
        ,lastdistdate
        ,if(lowestqty = '', null, cast(lowestqty as decimal(20,4))) as lowestqty
        ,if(onlineextqty = '', null, cast(onlineextqty as decimal(20,4))) as 
onlineextqty
        ,if(allocqty = '', null, cast(allocqty as decimal(20,4))) as allocqty
        ,if(minstroeqty = '', null, cast(minstroeqty as decimal(20,4))) as 
minstroeqty
        ,if(enrouteqty = '', null, cast(enrouteqty as decimal(20,4))) as 
enrouteqty
        ,if(reserveqty = '', null, cast(reserveqty as decimal(20,4))) as 
reserveqty
        ,if(sumdefectqty = '', null, cast(sumdefectqty as decimal(20,4))) as 
sumdefectqty
        ,if(shelvesqty = '', null, cast(shelvesqty as decimal(20,4))) as 
shelvesqty
        ,if(recallqty = '', null, cast(recallqty as decimal(20,4))) as recallqty
        ,if(resaleqty = '', null, cast(resaleqty as decimal(20,4))) as resaleqty
        ,if(sumtestqty = '', null, cast(sumtestqty as decimal(20,4))) as 
sumtestqty
        ,if(saledayqty = '', null, cast(saledayqty as decimal(20,4))) as 
saledayqty
        ,lastbreakdate
        ,lastbreakdhdate
        ,utimeforplat
        ,transplatstatus
        ,subitemid
        ,if(dayavgqty = '', null, cast(dayavgqty as decimal(20,4))) as dayavgqty
        -- ,substr(breakstockdate, 1, 10) breakstockdate
        ,case when sumqty <='0'  and breakstockdate is null then  '2023-02-07'  
else  substr(breakstockdate, 1, 10) end  breakstockdate
        ,time_stamp
        ,trim(group_id) group_id
        FROM
                t_store_stock
   
   t_store_stock table data:
   |group_id|busno|wareid|compid|data_source|time_stamp       
|sumqty|autocomputemaxstore|autocomputeminstore|maxday|minday|maxstore|minstore|storepurprice|lastmdistqty|autodistapply|lastm2qty|lastm3qty|lastmqty|lastyqty|oosdays|sumawaitqty|sumpendingqty|sumawaitqty_nobatch|lastsaledate
         |lastapplyqty|lastapplydate|lastdistqty|lastdistdate           
|lowestqty|onlineextqty|allocqty|minstroeqty|enrouteqty|reserveqty|sumdefectqty|shelvesqty|recallqty|resaleqty|sumtestqty|saledayqty|lastbreakdate|lastbreakdhdate|utimeforplat|transplatstatus|subitemid|dayavgqty|breakstockdate|
   
|--------|-----|------|------|-----------|-----------------|------|-------------------|-------------------|------|------|--------|--------|-------------|------------|-------------|---------|---------|--------|--------|-------|-----------|-------------|-------------------|---------------------|------------|-------------|-----------|-----------------------|---------|------------|--------|-----------|----------|----------|------------|----------|---------|---------|----------|----------|-------------|---------------|------------|---------------|---------|---------|--------------|
   |123456  |1013 |164083|123456|h1         |1,676,360,535,095|0.0   |1         
         |1                  |60.0  |      |7.0     |3.0     |14.0         |1.0 
        |1            |2.0      |7.0      |        |        |       |0.0        
|0.0          |0.0                |2023-01-29 00:00:00.0|            |          
   |1.0        |2023-01-14 09:53:57.457|         |0.0         |0.0     |        
   |          |          |            |          |         |         |          
|          |             |               |            |               |         
|         |              |
   
   
   > nothing special about this setup so it looks like a data issue. @nbeeee 
can you share the schema and some sample data to help reproduce? cc @jonvex
   
   


-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to