Skip to content

Support CAST clause #9

New issue

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

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

Already on GitHub? # to your account

Open
DragonFly666 opened this issue Mar 6, 2018 · 1 comment
Open

Support CAST clause #9

DragonFly666 opened this issue Mar 6, 2018 · 1 comment

Comments

@DragonFly666
Copy link

code


select
concat(dsw_cluster_name,',',logic_pod_name) as event_obj,
concat(dsw_cluster_name,',',logic_pod_name, ' PFC STORM. 详情: ',
'流量突跃 ', cast(FLOW_RX_BPS_RATE100 as int), '%(RX)',
'; ', cast(FLOW_TX_BPS_RATE
100 as int), '%(TX)',
'; PFC 突增 ', cast(PFC_RX_PPS_RATE*100 as int), '%(RECV)') as brief
from SOURCE_BASIC_EVENT_POD_FLOW_AND_PFC_TREND
where win_end >= '${yyyy-MM-dd HH:mm:ss - 2m}'
and win_end < '${yyyy-MM-dd HH:mm:ss}'
and PFC_RX_PPS_RATE >= 100
and (FLOW_RX_BPS_RATE <= -0.2 and FLOW_TX_BPS_RATE <= -0.2)

error like this
{message: "Parse error on line 4:↵...LOW_RX_BPS_RATE*100 as i…,', ')', 'AND', '&&', '||', 'OR', 'XOR', got 'AS'", hash: {…}}

@albin3
Copy link
Member

albin3 commented Mar 6, 2018

Cast function is not supported currently.

to support: https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html

@albin3 albin3 changed the title can not parse code like this Support CAST clause Mar 16, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants