alibaba / alibaba/druid

DB2数据库不识别DEFINITION ONLY关键字

Open
#4,698 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
28.2k
Forks
8.6k
PR merge metrics
No merged PRs in 30d

Description

最近测试项目DB2数据库适配,发现druid在解析sql时不识别DEFINITION ONLY关键字,导致如下错误。我需要执行的sql是`CREATE TABLE TRACE_LOG_BK AS (SELECT * FROM TRACE_LOG) DEFINITION ONLY`
![图片](https://user-images.githubusercontent.com/45647323/156305341-ea6d49ca-fd86-4a11-8723-18da61693759.png)
我使用的druid版本为:1.1.10(druid-spring-boot-starter),切换为最新版本1.2.8,还是有此问题

Contributor guide

Open the contributing guide

Research direction

Reproduce the parser failure with `CREATE TABLE TRACE_LOG_BK AS (SELECT * FROM TRACE_LOG) DEFINITION ONLY` using the reported Druid versions, then trace how this DB2 CREATE TABLE statement is parsed. Done means the statement parses successfully without the reported error while preserving existing behavior for related SQL.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.