siddhi-io / siddhi-execution-string Goto Github PK
View Code? Open in Web Editor NEWExtension that provides basic string handling capabilities
Home Page: https://wso2-extensions.github.io/siddhi-execution-string/
License: Apache License 2.0
Extension that provides basic string handling capabilities
Home Page: https://wso2-extensions.github.io/siddhi-execution-string/
License: Apache License 2.0
Description:
The first parameter type in function groupConcat is String. So if the column I need to use in function groupConcat is not string, I need to cast the column type to string. But there still throw an exception "Integer cannot cast to string" even I have already cast the column type to string.
Affected Product Version:
4.0.24
Steps to reproduce:
-- Please refer to https://docs.wso2.com/display/SP400/Quick+Start+Guide on getting started with SP editor.
define stream inputstream (id string,weight int);
@sink(type='log', prefix='LOGGER')
define stream OutputStream(id string,weight string);
@info(name='GroupbyQuery')
from inputstream#window.timeBatch(10 second)
select id,str:groupConcat(cast(weight,'string'),',',true) as weight
group by id
insert into OutputStream;`
[2018-12-28_08-58-27_187] ERROR {org.wso2.siddhi.core.query.processor.stream.AbstractStreamProcessor} - Error on 'GroupByApp'. java.lang.Integer cannot be cast to java.lang.String Dropping event chunk EventChunk{first=StreamEvent{ timestamp=1545958697185, beforeWindowData=null, onAfterWindowData=[1], outputData=[1, null], type=CURRENT, next=null}}, error in processing org.wso2.siddhi.core.query.processor.stream.window.TimeBatchWindowProcessor. (Encoded) java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at org.wso2.extension.siddhi.execution.string.GroupConcatFunctionExtension.processAdd(GroupConcatFunctionExtension.java:167) at org.wso2.siddhi.core.query.selector.attribute.aggregator.AttributeAggregator.process(AttributeAggregator.java:82) at org.wso2.siddhi.core.query.selector.attribute.processor.executor.GroupByAggregationAttributeExecutor.execute(GroupByAggregationAttributeExecutor.java:92) at org.wso2.siddhi.core.query.selector.attribute.processor.AttributeProcessor.process(AttributeProcessor.java:41) at org.wso2.siddhi.core.query.selector.QuerySelector.processInBatchGroupBy(QuerySelector.java:293) at org.wso2.siddhi.core.query.selector.QuerySelector.process(QuerySelector.java:84) at org.wso2.siddhi.core.query.processor.stream.window.TimeBatchWindowProcessor.process(TimeBatchWindowProcessor.java:254) at org.wso2.siddhi.core.query.processor.stream.window.WindowProcessor.processEventChunk(WindowProcessor.java:66) at org.wso2.siddhi.core.query.processor.stream.AbstractStreamProcessor.process(AbstractStreamProcessor.java:125) at org.wso2.siddhi.core.query.input.stream.single.EntryValveProcessor.process(EntryValveProcessor.java:50) at org.wso2.siddhi.core.util.Scheduler.sendTimerEvents(Scheduler.java:197) at org.wso2.siddhi.core.util.Scheduler$EventCaller.run(Scheduler.java:249) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
Description:
The following changes are required.
Please find the context in the config file[1]
Description:
$subject
https://github.com/siddhi-io/siddhi-execution-string/blob/master/component/src/test/java/io/siddhi/extension/execution/string/CharAtFunctionExtensionTestCase.java#L169
This can be easily achieved through Siddhi Error Streams
Description:
Improve logging in GetStringJSONFunctionExtension
INFO {io.siddhi.extension.execution.json.function.GetStringJSONFunctionExtension} - CollectorApp:query_2: Cannot find json element for the path 'field_462501'. Hence returning the default value 'null' (Encoded)
Description:
Currently, only string
params can be passed to str:concat()
, but if we need to contact a string
and int
, then we have to first convert the int
to string
and then pass that to str:concat()
.
This can be improved if we can support str:concat()
to accept other formats other than string
.
Description:
Add a function that aggregate a specified string attribute of events in a stream and concatenate to them into a single string. This function should behave similar to MySQL GROUP_CONCAT
function.
SELECT student_name,
GROUP_CONCAT(test_score)
FROM student
GROUP BY student_name;
Affected Product Version:
Siddhi v4.x.x
Description:
I am trying to use the string tokenize method in Siddhi in my siddhi app, I tried to find the details in the documentation, but it is not clear. Following is a screenshot from the documentation.
What is the return value of the tokenizer ? When we tokenize a string, what is the attribute value of the tokenized string ?
Suggested Labels:
siddhi, siddhi-string-extension, string, tokenize, tokenizer
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
Currently, Siddhi execution string does not support string manipulation for the following scenarios.
S=" {{prize}} > 100 "
and the value of the prize coming from a different stream. Assume that, now the prize is 300. Then I need to get the string S'= "300 > 100"
S' = "300 > 100"
and evaluate it. The evaluation of that mathematical expression should return true
.str: map(STRING, STRING...)
and this will return a STRING.str: eval(STRING, STRING...)
and this will return an Object.Suggested Labels:
Feature improvement
While running WSO2 gateway sending the mail below error is coming
ERROR {io.siddhi.core.stream.output.sink.Sink} - Error on 'APIM_ALERT_EMAIL_NOTIFICATION'. Error is encountered while connecting to the smtp server.Error is encountered while creating the connection using the session.Couldn't connect to host, port: smtp.gmail.com, 465; timeout -1, error while connecting at Sink 'email' at 'EmailNotificationStream', will retry in '30 sec'. io.siddhi.core.exception.ConnectionUnavailableException: Error is encountered while connecting to the smtp server.
Description:
In str:tokenize
extension, all the splitted tokens are returned. There is no way to get only distinct tokens. Therefore a parameter needs to be introduced to get only distinct tokens.
Affected Product Version:
4.0.14
Content of auto generated documentation site should be updated and refined.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.