Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG,visitor.getConditions()解析出来缺少 DATE_FORMAT(add_time, '%Y-%m-%d') #2422

Closed
willenfoo opened this issue Mar 22, 2018 · 0 comments
Labels
Milestone

Comments

@willenfoo
Copy link
Contributor

willenfoo commented Mar 22, 2018

SQL:

SELECT
	id AS id,
	activity_code AS activityCode,
	activity_name AS activityName,
	start_time AS startTime,
	end_time AS endTime,
	`state`,
	bonus_type AS bonusType,
	send_num AS sendNum,
	points,
	exchange_flag AS exchangeFlag,
	exchange_points AS exchangePoints,
	auth_code_key AS authCodeKey,
	auth_code_key_repeat AS authCodeKeyRepeat,
	`type`,
	mobile_flag AS mobileFlag,
	activity_code_list AS activityCodeList,
	register_product_id AS registerProductId,
	add_user AS addUser,
	add_time AS addTime,
	mod_user AS modUser,
	delete_flag AS deleteFlag
FROM
	tb_activity
WHERE
	id != 1
AND id NOT IN (1, 2)
and DATE_FORMAT(add_time, '%Y-%m-%d') = '2018-08-08';
 List<SQLStatement> stmtList = SQLUtils.parseStatements(sql, JdbcConstants.MYSQL);
 SQLStatement stmt = stmtList.get(0);
MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
stmt.accept(visitor);
List<TableStat.Condition> conditions = visitor.getConditions();

BUG: visitor.getConditions()解析出来缺少 DATE_FORMAT(add_time, '%Y-%m-%d')

@willenfoo willenfoo changed the title BUG BUG,visitor.getConditions()解析出来缺少 DATE_FORMAT(add_time, '%Y-%m-%d') Mar 22, 2018
@wenshao wenshao added the Bug label Mar 22, 2018
@wenshao wenshao added this to the 1.1.10 milestone Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants