[jira] [Updated] (IGNITE-3608) QuerySqlFunction methods with Object type var args do not work

2018-08-16 Thread Vladimir Ozerov (JIRA)


 [ 
https://issues.apache.org/jira/browse/IGNITE-3608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladimir Ozerov updated IGNITE-3608:

Labels: UDF  (was: SQL UDF)

> QuerySqlFunction methods with Object type var args do not work
> --
>
> Key: IGNITE-3608
> URL: https://issues.apache.org/jira/browse/IGNITE-3608
> Project: Ignite
>  Issue Type: Bug
>  Components: cache, sql
>Affects Versions: 1.5.0.final, 1.6
>Reporter: Edward Kaganovich
>Priority: Major
>  Labels: UDF
> Fix For: 1.9
>
>
> We often use interactive sql consoles to query caches.  Several field values 
> as well as _key in caches are stored as objects.  To support queries by these 
> fields we have registered a generic UDF that should let us instantiate 
> certain types:
> {code}  @QuerySqlFunction 
> public static Object t(String clz, Object... ctorArgs) throws
> Exception {
> Class c = Class.forName(keyClz); 
> Class[] argTypes = new Class[ctorArgs.length]; 
> for (int i=0; i < ctorArgs.length; i++) { 
> argTypes[i] = ctorArgs[i].getClass(); 
> } 
> Constructor ctor = c.getConstructor(argTypes); 
> return ctor.newInstance(ctorArgs); 
> }
> {code}
> Unfortunately Ignite fails to find and execute this function for the 
> following SQL:
> {color:blue}select t('java.lang.String', 'key20'){color}{color:red} <- 
> Fails{color}
> However, there is no problems with this function:
> {code}   @QuerySqlFunction 
> public static Object t1(String clz, String... ctorArgs) throws Exception 
> { 
> return t(clz, ctorArgs);
> }
> {code}
> {color:blue}select t1('java.lang.String', 'key20'){color}{color:green} <- 
> Works as expected{color}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (IGNITE-3608) QuerySqlFunction methods with Object type var args do not work

2017-01-25 Thread Vladimir Ozerov (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-3608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladimir Ozerov updated IGNITE-3608:

Assignee: Sergey Kalashnikov

> QuerySqlFunction methods with Object type var args do not work
> --
>
> Key: IGNITE-3608
> URL: https://issues.apache.org/jira/browse/IGNITE-3608
> Project: Ignite
>  Issue Type: Bug
>  Components: cache, SQL
>Affects Versions: 1.5.0.final, 1.6
>Reporter: Edward Kaganovich
>Assignee: Sergey Kalashnikov
>  Labels: SQL, UDF
> Fix For: 1.9
>
>
> We often use interactive sql consoles to query caches.  Several field values 
> as well as _key in caches are stored as objects.  To support queries by these 
> fields we have registered a generic UDF that should let us instantiate 
> certain types:
> {code}  @QuerySqlFunction 
> public static Object t(String clz, Object... ctorArgs) throws
> Exception {
> Class c = Class.forName(keyClz); 
> Class[] argTypes = new Class[ctorArgs.length]; 
> for (int i=0; i < ctorArgs.length; i++) { 
> argTypes[i] = ctorArgs[i].getClass(); 
> } 
> Constructor ctor = c.getConstructor(argTypes); 
> return ctor.newInstance(ctorArgs); 
> }
> {code}
> Unfortunately Ignite fails to find and execute this function for the 
> following SQL:
> {color:blue}select t('java.lang.String', 'key20'){color}{color:red} <- 
> Fails{color}
> However, there is no problems with this function:
> {code}   @QuerySqlFunction 
> public static Object t1(String clz, String... ctorArgs) throws Exception 
> { 
> return t(clz, ctorArgs);
> }
> {code}
> {color:blue}select t1('java.lang.String', 'key20'){color}{color:green} <- 
> Works as expected{color}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (IGNITE-3608) QuerySqlFunction methods with Object type var args do not work

2017-01-25 Thread Vladimir Ozerov (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-3608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladimir Ozerov updated IGNITE-3608:

Fix Version/s: (was: 2.0)
   1.9

> QuerySqlFunction methods with Object type var args do not work
> --
>
> Key: IGNITE-3608
> URL: https://issues.apache.org/jira/browse/IGNITE-3608
> Project: Ignite
>  Issue Type: Bug
>  Components: cache, SQL
>Affects Versions: 1.5.0.final, 1.6
>Reporter: Edward Kaganovich
>Assignee: Sergey Kalashnikov
>  Labels: SQL, UDF
> Fix For: 1.9
>
>
> We often use interactive sql consoles to query caches.  Several field values 
> as well as _key in caches are stored as objects.  To support queries by these 
> fields we have registered a generic UDF that should let us instantiate 
> certain types:
> {code}  @QuerySqlFunction 
> public static Object t(String clz, Object... ctorArgs) throws
> Exception {
> Class c = Class.forName(keyClz); 
> Class[] argTypes = new Class[ctorArgs.length]; 
> for (int i=0; i < ctorArgs.length; i++) { 
> argTypes[i] = ctorArgs[i].getClass(); 
> } 
> Constructor ctor = c.getConstructor(argTypes); 
> return ctor.newInstance(ctorArgs); 
> }
> {code}
> Unfortunately Ignite fails to find and execute this function for the 
> following SQL:
> {color:blue}select t('java.lang.String', 'key20'){color}{color:red} <- 
> Fails{color}
> However, there is no problems with this function:
> {code}   @QuerySqlFunction 
> public static Object t1(String clz, String... ctorArgs) throws Exception 
> { 
> return t(clz, ctorArgs);
> }
> {code}
> {color:blue}select t1('java.lang.String', 'key20'){color}{color:green} <- 
> Works as expected{color}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (IGNITE-3608) QuerySqlFunction methods with Object type var args do not work

2016-11-17 Thread Vladimir Ozerov (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-3608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladimir Ozerov updated IGNITE-3608:

Fix Version/s: (was: 1.8)
   2.0

> QuerySqlFunction methods with Object type var args do not work
> --
>
> Key: IGNITE-3608
> URL: https://issues.apache.org/jira/browse/IGNITE-3608
> Project: Ignite
>  Issue Type: Bug
>  Components: cache, SQL
>Affects Versions: 1.5.0.final, 1.6
>Reporter: Edward Kaganovich
>  Labels: SQL, UDF
> Fix For: 2.0
>
>
> We often use interactive sql consoles to query caches.  Several field values 
> as well as _key in caches are stored as objects.  To support queries by these 
> fields we have registered a generic UDF that should let us instantiate 
> certain types:
> {code}  @QuerySqlFunction 
> public static Object t(String clz, Object... ctorArgs) throws
> Exception {
> Class c = Class.forName(keyClz); 
> Class[] argTypes = new Class[ctorArgs.length]; 
> for (int i=0; i < ctorArgs.length; i++) { 
> argTypes[i] = ctorArgs[i].getClass(); 
> } 
> Constructor ctor = c.getConstructor(argTypes); 
> return ctor.newInstance(ctorArgs); 
> }
> {code}
> Unfortunately Ignite fails to find and execute this function for the 
> following SQL:
> {color:blue}select t('java.lang.String', 'key20'){color}{color:red} <- 
> Fails{color}
> However, there is no problems with this function:
> {code}   @QuerySqlFunction 
> public static Object t1(String clz, String... ctorArgs) throws Exception 
> { 
> return t(clz, ctorArgs);
> }
> {code}
> {color:blue}select t1('java.lang.String', 'key20'){color}{color:green} <- 
> Works as expected{color}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (IGNITE-3608) QuerySqlFunction methods with Object type var args do not work

2016-08-09 Thread Pavel Tupitsyn (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-3608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Tupitsyn updated IGNITE-3608:
---
Fix Version/s: (was: 1.7)
   1.8

> QuerySqlFunction methods with Object type var args do not work
> --
>
> Key: IGNITE-3608
> URL: https://issues.apache.org/jira/browse/IGNITE-3608
> Project: Ignite
>  Issue Type: Bug
>  Components: cache, SQL
>Affects Versions: 1.5.0.final, 1.6
>Reporter: Edward Kaganovich
>  Labels: SQL, UDF
> Fix For: 1.8
>
>
> We often use interactive sql consoles to query caches.  Several field values 
> as well as _key in caches are stored as objects.  To support queries by these 
> fields we have registered a generic UDF that should let us instantiate 
> certain types:
> {code}  @QuerySqlFunction 
> public static Object t(String clz, Object... ctorArgs) throws
> Exception {
> Class c = Class.forName(keyClz); 
> Class[] argTypes = new Class[ctorArgs.length]; 
> for (int i=0; i < ctorArgs.length; i++) { 
> argTypes[i] = ctorArgs[i].getClass(); 
> } 
> Constructor ctor = c.getConstructor(argTypes); 
> return ctor.newInstance(ctorArgs); 
> }
> {code}
> Unfortunately Ignite fails to find and execute this function for the 
> following SQL:
> {color:blue}select t('java.lang.String', 'key20'){color}{color:red} <- 
> Fails{color}
> However, there is no problems with this function:
> {code}   @QuerySqlFunction 
> public static Object t1(String clz, String... ctorArgs) throws Exception 
> { 
> return t(clz, ctorArgs);
> }
> {code}
> {color:blue}select t1('java.lang.String', 'key20'){color}{color:green} <- 
> Works as expected{color}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (IGNITE-3608) QuerySqlFunction methods with Object type var args do not work

2016-07-29 Thread Dmitriy Setrakyan (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-3608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitriy Setrakyan updated IGNITE-3608:
--
Fix Version/s: 1.7

> QuerySqlFunction methods with Object type var args do not work
> --
>
> Key: IGNITE-3608
> URL: https://issues.apache.org/jira/browse/IGNITE-3608
> Project: Ignite
>  Issue Type: Bug
>  Components: cache, SQL
>Affects Versions: 1.5.0.final, 1.6
>Reporter: Edward Kaganovich
>  Labels: SQL, UDF
> Fix For: 1.7
>
>
> We often use interactive sql consoles to query caches.  Several field values 
> as well as _key in caches are stored as objects.  To support queries by these 
> fields we have registered a generic UDF that should let us instantiate 
> certain types:
> {code}  @QuerySqlFunction 
> public static Object t(String clz, Object... ctorArgs) throws
> Exception {
> Class c = Class.forName(keyClz); 
> Class[] argTypes = new Class[ctorArgs.length]; 
> for (int i=0; i < ctorArgs.length; i++) { 
> argTypes[i] = ctorArgs[i].getClass(); 
> } 
> Constructor ctor = c.getConstructor(argTypes); 
> return ctor.newInstance(ctorArgs); 
> }
> {code}
> Unfortunately Ignite fails to find and execute this function for the 
> following SQL:
> {color:blue}select t('java.lang.String', 'key20'){color}{color:red} <- 
> Fails{color}
> However, there is no problems with this function:
> {code}   @QuerySqlFunction 
> public static Object t1(String clz, String... ctorArgs) throws Exception 
> { 
> return t(clz, ctorArgs);
> }
> {code}
> {color:blue}select t1('java.lang.String', 'key20'){color}{color:green} <- 
> Works as expected{color}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (IGNITE-3608) QuerySqlFunction methods with Object type var args do not work

2016-07-29 Thread Edward Kaganovich (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-3608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Edward Kaganovich updated IGNITE-3608:
--
Description: 
We often use interactive sql consoles to query caches.  Several field values as 
well as _key in caches are stored as objects.  To support queries by these 
fields we have registered a generic UDF that should let us instantiate certain 
types:

{code}  @QuerySqlFunction 
public static Object t(String clz, Object... ctorArgs) throwsException {
Class c = Class.forName(keyClz); 
Class[] argTypes = new Class[ctorArgs.length]; 
for (int i=0; i < ctorArgs.length; i++) { 
argTypes[i] = ctorArgs[i].getClass(); 
} 
Constructor ctor = c.getConstructor(argTypes); 
return ctor.newInstance(ctorArgs); 
}
{code}
Unfortunately Ignite fails to find and execute this function for the following 
SQL:
{color:blue}select t('java.lang.String', 'key20'){color}{color:red} <- 
Fails{color}

However, there is no problems with this function:
{code}   @QuerySqlFunction 
public static Object t1(String clz, String... ctorArgs) throws Exception { 
return t(clz, ctorArgs);
}
{code}
{color:blue}select t1('java.lang.String', 'key20'){color}{color:green} <- Works 
as expected{color}

  was:
We often use interactive sql consoles to query caches.  Several field values as 
well as _key in caches are stored as objects.  To support queries by these 
fields we have registered a generic UDF that should let us instantiate certain 
types:

{code}   @QuerySqlFunction Object t(String clz, Object... ctorArgs) throws
Exception {
Class c = Class.forName(keyClz); 
Class[] argTypes = new Class[ctorArgs.length]; 
for (int i=0; i < ctorArgs.length; i++) { 
argTypes[i] = ctorArgs[i].getClass(); 
} 
Constructor ctor = c.getConstructor(argTypes); 
return ctor.newInstance(ctorArgs); 
}
{code}
Unfortunately Ignite fails to find and execute this function for the following 
SQL:
{color:blue}select t('java.lang.String', 'key20')){color}{color:red} <- 
Fails{color}

However, there is no problems with this function:
{code}   @QuerySqlFunction 
public static Object t1(String clz, String... ctorArgs) throws Exception { 
return t(clz, ctorArgs);
}
{code}
{color:blue}select t1('java.lang.String', 'key20')){color}{color:green} <- 
Works as expected{color}


> QuerySqlFunction methods with Object type var args do not work
> --
>
> Key: IGNITE-3608
> URL: https://issues.apache.org/jira/browse/IGNITE-3608
> Project: Ignite
>  Issue Type: Bug
>  Components: cache, SQL
>Affects Versions: 1.5.0.final, 1.6
>Reporter: Edward Kaganovich
>  Labels: SQL, UDF
>
> We often use interactive sql consoles to query caches.  Several field values 
> as well as _key in caches are stored as objects.  To support queries by these 
> fields we have registered a generic UDF that should let us instantiate 
> certain types:
> {code}  @QuerySqlFunction 
> public static Object t(String clz, Object... ctorArgs) throws
> Exception {
> Class c = Class.forName(keyClz); 
> Class[] argTypes = new Class[ctorArgs.length]; 
> for (int i=0; i < ctorArgs.length; i++) { 
> argTypes[i] = ctorArgs[i].getClass(); 
> } 
> Constructor ctor = c.getConstructor(argTypes); 
> return ctor.newInstance(ctorArgs); 
> }
> {code}
> Unfortunately Ignite fails to find and execute this function for the 
> following SQL:
> {color:blue}select t('java.lang.String', 'key20'){color}{color:red} <- 
> Fails{color}
> However, there is no problems with this function:
> {code}   @QuerySqlFunction 
> public static Object t1(String clz, String... ctorArgs) throws Exception 
> { 
> return t(clz, ctorArgs);
> }
> {code}
> {color:blue}select t1('java.lang.String', 'key20'){color}{color:green} <- 
> Works as expected{color}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)