doris icon indicating copy to clipboard operation
doris copied to clipboard

[fix](restore) Analyze idx meta in Olap Table after restore commit

Open wyxxxcat opened this issue 6 months ago • 2 comments

reproduce: backup and restore Table or restart fe, then insert

before:

desc tbl all
*************************** 26. row ***************************
    IndexName: idx
IndexKeysType: AGG_KEYS
        Field: mv_date_format(hours_add(happen_time, 1), '%Y-%m-%d %H:00:00')
         Type: varchar(65533)
 InternalType: varchar(65533)
         Null: Yes
          Key: true
      Default: NULL
        Extra: 
      Visible: true
   DefineExpr:
  WhereClause:

insert into wrong
[ANALYSIS_ERROR]TStatus: errCode = 2, detailMessage = column has no source field, column=mva_SUM__CASE WHEN 1 IS NULL THEN 0 ELSE 1 END

now

desc tbl all
*************************** 26. row ***************************
    IndexName: idx
IndexKeysType: AGG_KEYS
        Field: mv_date_format(hours_add(happen_time, 1), '%Y-%m-%d %H:00:00')
         Type: varchar(65533)
 InternalType: varchar(65533)
         Null: Yes
          Key: true
      Default: NULL
        Extra: 
      Visible: true
   DefineExpr: date_format(hours_add(`happen_time`, 1), '%Y-%m-%d %H:00:00')
  WhereClause: (`k1` > '2025-06-12 00:00:00')

insert into ok

wyxxxcat avatar Jun 19 '25 01:06 wyxxxcat

Thank you for your contribution to Apache Doris. Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

Thearas avatar Jun 19 '25 01:06 Thearas

run buildall

wyxxxcat avatar Jun 19 '25 01:06 wyxxxcat

PR approved by at least one committer and no changes requested.

github-actions[bot] avatar Jun 19 '25 07:06 github-actions[bot]

PR approved by anyone and no changes requested.

github-actions[bot] avatar Jun 19 '25 07:06 github-actions[bot]