[JBoss JIRA] (TEIID-4992) Add OSDQ set functions
by vivek singh (JIRA)
[ https://issues.jboss.org/browse/TEIID-4992?page=com.atlassian.jira.plugin... ]
vivek singh commented on TEIID-4992:
------------------------------------
osDQ core version 6.2.2 will have jar to support following API
/**
* @author vivek singh
*
*/
import java.util.Arrays;
import java.util.Vector;
import org.arrah.framework.analytics.SetAnalysis;
/**
* @author viveksingh
*
*/
public class SetUtil {
/**
* @param seta
* the input set A where memebers can be duplicate
* @param setb
* the input set B where memebers can be duplicate
* @return
* Union of Set A and set B where memebers can not be duplicate
*/
Object[] unionSet(Object[] seta, Object[] setb) {
if (seta == null ) return setb;
if (setb == null ) return setb;
SetAnalysis sa = new SetAnalysis(new Vector<Object>(Arrays.asList(seta)),
new Vector<Object>(Arrays.asList(setb)));
return sa.getUnion().toArray();
}
/**
* @param seta
* the input set A where memebers can be duplicate
* @param setb
* the input set B where memebers can be duplicate
* @param fuzzyIndex
* this is the fuzzy distance which will match similar words
* 0.0 - will take all ( no match) and > 1.0 will match exact
* @return
* Union of Set A and set B where memebers can not be duplicate
*/
Object[] unionFuzzy(Object[] seta, Object[] setb, float fuzzyIndex) {
if (seta == null ) return setb;
if (setb == null ) return setb;
SetAnalysis sa = new SetAnalysis(new Vector<Object>(Arrays.asList(seta)),
new Vector<Object>(Arrays.asList(setb)));
return sa.getUnion(fuzzyIndex).toArray();
}
/**
* @param seta
* the input set A where memebers can be duplicate
* @param setb
* the input set B where memebers can be duplicate
* @return
* Intersection of Set A and set B where memebers can not be duplicate
*/
Object[] intersectionSet(Object[] seta, Object[] setb) {
if (seta == null || setb == null) return null;
SetAnalysis sa = new SetAnalysis(new Vector<Object>(Arrays.asList(seta)),
new Vector<Object>(Arrays.asList(setb)));
return sa.getIntersection().toArray();
}
/**
* @param seta
* the input set A where memebers can be duplicate
* @param setb
* the input set B where memebers can be duplicate
* @param fuzzyIndex
* this is the fuzzy distance which will match similar words
* 0.0 - will take all ( no match) and > 1.0 will match exact
* @return
* Intersection of Set A and set B where memebers can not be duplicate
*/
Object[] intersectionFuzzy(Object[] seta, Object[] setb, float fuzzyIndex) {
if (seta == null || setb == null) return null;
SetAnalysis sa = new SetAnalysis(new Vector<Object>(Arrays.asList(seta)),
new Vector<Object>(Arrays.asList(setb)));
return sa.getIntersection(fuzzyIndex).toArray();
}
/**
* @param seta
* the input set A where memebers can be duplicate
* @param setb
* the input set B where memebers can be duplicate
* @return
* Difference of Set A and set B where memebers can not be duplicate
* Elements which are there in set A but not in set B
*/
Object[] minusSet(Object[] seta, Object[] setb) {
if (seta == null ) return null;
if (setb == null ) return seta;
SetAnalysis sa = new SetAnalysis();
return sa.getDifference(new Vector<Object>(Arrays.asList(seta)),
new Vector<Object>(Arrays.asList(setb))).toArray();
}
/**
* @param seta
* the input set A where memebers can be duplicate
* @param setb
* the input set B where memebers can be duplicate
* @param fuzzyIndex
* this is the fuzzy distance which will match similar words
* 0.0 - will take all ( no match) and > 1.0 will match exact
* @return
* Difference of Set A and set B where memebers can not be duplicate
* Elements which are there in set A but not in set B
*/
Object[] minusFuzzy(Object[] seta, Object[] setb, float fuzzyIndex) {
if (seta == null ) return null;
if (setb == null ) return seta;
SetAnalysis sa = new SetAnalysis();
return sa.getDifference(new Vector<Object>(Arrays.asList(seta)),
new Vector<Object>(Arrays.asList(setb)),fuzzyIndex).toArray();
}
// for testing
public static void main(String[] args) {
Object[] first = new Object[]{"vivek","vivek16","abcd","vivek44"};
Object[] second = new Object[]{"vivek36","vivekkk","abcd","vivek445"};
SetUtil setu = new SetUtil();
//Object[] finaltse = setu.unionSet(first, second);
//Object[] finaltse = setu.unionFuzzy(first, second, 1.1f);
//Object[] finaltse = setu.intersectionSet(first, second);
//Object[] finaltse = setu.intersectionFuzzy(first, second,1.1f);
//Object[] finaltse = setu.minusSet(first, second);
Object[] finaltse = setu.minusFuzzy(first, second,1.1f);
for (Object a:finaltse)
System.out.println(a.toString());
}
}
> Add OSDQ set functions
> ----------------------
>
> Key: TEIID-4992
> URL: https://issues.jboss.org/browse/TEIID-4992
> Project: Teiid
> Issue Type: Enhancement
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 10.0
>
> Attachments: SetUtil.java
>
>
> There will be a new osdq core library drop in maven central soon containing additional functions for Teiid to add.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (TEIID-5010) Swarm usage should be more configurable
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-5010:
-------------------------------------
Summary: Swarm usage should be more configurable
Key: TEIID-5010
URL: https://issues.jboss.org/browse/TEIID-5010
Project: Teiid
Issue Type: Sub-task
Components: WildFly Swarm
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 10.0
When building a swarm uber jar the wildfly/swarm functionality remains the same regardless of what is needed. The wildfly fractions/subsystems need to be configurable so that we can drop systems, such as the web server, selectively.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (TEIID-4918) Enhance infinispan support for muti-threaded puts or using putAll
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4918?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4918:
-------------------------------------
Right now I am considering this only used in 6.4 with old style of before and after scripts with truncate/rename. The latter one uses the upsert mechanism which never really starts with empty table other than very first time. So, IMO that may be little less useful there. We need to really solve the UDF issue on the Infinispan side for correct behavior. So, let's come back to it at a later point, hopefully, by then Infinispan will solve the issue on their side.
> Enhance infinispan support for muti-threaded puts or using putAll
> -----------------------------------------------------------------
>
> Key: TEIID-4918
> URL: https://issues.jboss.org/browse/TEIID-4918
> Project: Teiid
> Issue Type: Enhancement
> Components: Infinispan
> Affects Versions: 9.3, 8.12.x-6.4
> Reporter: Van Halbert
> Assignee: Ramesh Reddy
> Fix For: 10.0
>
>
> For performance reasons, it was requested that the infinispan connector/translator be enhanced to be multi-threaded when doing batch inserts or try using the putAll option.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (TEIID-4918) Enhance infinispan support for muti-threaded puts or using putAll
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4918?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4918:
---------------------------------------
As this relates to materialization, do you want to have the system procedures add a general hint, e.g. 'bulk-load', that the translator would look for as well?
> Enhance infinispan support for muti-threaded puts or using putAll
> -----------------------------------------------------------------
>
> Key: TEIID-4918
> URL: https://issues.jboss.org/browse/TEIID-4918
> Project: Teiid
> Issue Type: Enhancement
> Components: Infinispan
> Affects Versions: 9.3, 8.12.x-6.4
> Reporter: Van Halbert
> Assignee: Ramesh Reddy
> Fix For: 10.0
>
>
> For performance reasons, it was requested that the infinispan connector/translator be enhanced to be multi-threaded when doing batch inserts or try using the putAll option.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (TEIID-5009) Add license files to JDBC Driver
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5009?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5009:
---------------------------------------
Keep in mind that the original reason for TEIID-4094 was moot with later releases. We also had issues with bringing TEIID-4094 forward, so introducing new projects should be done with caution. If it's possible to just augment the existing assembly logic that seems a lot simpler.
> Add license files to JDBC Driver
> --------------------------------
>
> Key: TEIID-5009
> URL: https://issues.jboss.org/browse/TEIID-5009
> Project: Teiid
> Issue Type: Task
> Components: JDBC Driver
> Affects Versions: 8.12.x-6.4, 10.x
> Reporter: Van Halbert
> Assignee: Van Halbert
> Priority: Blocker
>
> Adding the license.xml and license.html files to the jdbc driver.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (TEIID-4918) Enhance infinispan support for muti-threaded puts or using putAll
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4918?page=com.atlassian.jira.plugin... ]
Ramesh Reddy resolved TEIID-4918.
---------------------------------
Resolution: Done
Based on feed back, I turned off the default Bulk Insert feature. If one want to use "putAll" based bulk insert, then the VDB needs to enable the capability by translator override like
{code}
<translator name="over-hr" type="infinispan-hotrod">
<property name="supportsBulkUpdate" value="true"/>
</translator>
{code}
then use the source hint in the query as below. Note that in the below query in the hint, the "localhost" is the name of the "source" in the VDB for Infinispan model.
{code}
insert /*+sh localhost:'use-putall' */ into G1 (e1, e2, e3) values (2, 'two', convert(2.0, double)), (3, 'three', convert(3.0, double));
{code}
> Enhance infinispan support for muti-threaded puts or using putAll
> -----------------------------------------------------------------
>
> Key: TEIID-4918
> URL: https://issues.jboss.org/browse/TEIID-4918
> Project: Teiid
> Issue Type: Enhancement
> Components: Infinispan
> Affects Versions: 9.3, 8.12.x-6.4
> Reporter: Van Halbert
> Assignee: Ramesh Reddy
> Fix For: 10.0
>
>
> For performance reasons, it was requested that the infinispan connector/translator be enhanced to be multi-threaded when doing batch inserts or try using the putAll option.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months