Cannot create table from metadata file
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1k
- Forks
- 423
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 24
Description
[2024/06/05 16:11:18.690 +08:00] [ERROR] [] ["DB::Exception: Cannot create table from metadata file /data/deploy/install/data/tiflash-9000/metadata/db_1077654/t_1487435.sql, error: DB::Exception: Cannot parse string 'CURRENT_DATE' as MyDate: syntax error at position 8 (parsed just 'CURRENT_'), stack trace:\n\n 0x1c54f3e\tDB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int) [tiflash+29708094]
/data/deploy/install/data/tiflash-9000/metadata/db_1077654/t_1487435.sql:
ATTACH TABLE t_1487435
(
id Int32,
company Nullable(String),
illegal_person Nullable(String),
original_qualifications_levels Nullable(String),
now_qualifications_levels Nullable(String),
registered_capital Nullable(String),
dataid Nullable(String),
declaration_type Nullable(String),
declaration_time Nullable(String),
annex_path Nullable(String),
annex_web_url Nullable(String),
dataid_new Nullable(String), q
data_caiji Nullable(MyDate) DEFAULT CAST('CURRENT_DATE' AS Nullable(MyDate)),
apt_code Nullable(String),
apt_code_date Nullable(MyDate),
project_name Nullable(String),
project_id Nullable(String),
company_id Nullable(String),
company_name Nullable(String),
apt_name Nullable(String)
)
ENGINE = DeltaMerge(id,
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the logged metadata file /data/deploy/install/data/tiflash-9000/metadata/db_1077654/t_1487435.sql and investigate the table-attachment path around the DEFAULT CAST('CURRENT_DATE' AS Nullable(MyDate)) expression. Reproduce the metadata-based table creation failure, then verify that the table attaches successfully without the reported MyDate parsing error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100