ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From saikiran939 <saikiran...@gmail.com>
Subject Possibility of default SQL functions to query 'Map' or 'List' based attributes
Date Tue, 12 Sep 2017 08:11:06 GMT
Hi Members,

We are using Ignite cache to store and querying data from the cache. The
POJO object for cache has Map of Maps e.g Map<String, Map&lt;String,
String>> based attribute values. 

Presently we are using custom SQL function to query these map based
attribute. Code would look something like below:

	public static String getAttribute(Object param, String aName , String
aAttributeName ) {
		HashMap attributeMap = (HashMap)((HashMap)param).get(aCategoryName);
			return null;
		return (String)attributeMap.get(aAttributeName);

The query makes use of this function as:
SELECT * FROM AttributesCache WHERE hash = ? AND (
getAttribute(attributeMap,?,?) LIKE ? )

Here attributeMap is the variable name of Map<String, Map&lt;String,
String>> attribute.

By making use of such Map based representation we were able to avoid more
than one cache and therefore we could avoid inner joins during querying and
transactions during update operation.

But the usage of this function warrants us to have this SQL function on
Ignite server node but we are aiming to remove classes not to be present at
ignite server node. 

My question is - is it possible for Ignite team to have such useful/common
Custom SQL functions (like querying Map or List or Collection) shipped
out-of-the-box ignite core jar ? This can help us in avoiding deploying such
basic sql functions class files at server node and everyone can benefit from
such sql functions. 

Sent from: http://apache-ignite-users.70518.x6.nabble.com/

View raw message