[jira] [Updated] (CASSANDRA-11392) Add auto import java.util for UDF code block
[ https://issues.apache.org/jira/browse/CASSANDRA-11392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Stupp updated CASSANDRA-11392: - Assignee: DOAN DuyHai > Add auto import java.util for UDF code block > > > Key: CASSANDRA-11392 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11392 > Project: Cassandra > Issue Type: Improvement > Components: CQL > Environment: C* 3.4 >Reporter: DOAN DuyHai >Assignee: DOAN DuyHai >Priority: Minor > Fix For: 3.6 > > Attachments: patch.txt > > > Right now, when creating Java source code for UDF, since we cannot define > import, we need to use fully qualified class name, ex: > {noformat} > CREATE FUNCTION toSet(li list) > CALLED ON NULL INPUT > RETURNS text > LANGUAGE java > AS $$ > java.util.Set set = new java.util.HashSet(); > for(String txt: list) { > set.add(txt); > } > return set; > $$; > {noformat} > Classes from {{java.util}} package are so commonly used that it makes > developer life easier to import automatically {{java.util.*}} in the > {{JavaUDF}} base class so that developers don't need to use FQCN for common > classes. > The only drawback I can see is the risk of class name clash but since: > 1. it is not allow to create new class > 2. classes that can be used in UDF are restricted > I don't see serious clash name issues either > [~snazy] WDYT ? > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-11392) Add auto import java.util for UDF code block
[ https://issues.apache.org/jira/browse/CASSANDRA-11392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Stupp updated CASSANDRA-11392: - Resolution: Fixed Status: Resolved (was: Patch Available) +1 Committed as 03b42a299b878264479068a3fae03aa2ca28d6b7 to trunk for 3.6 > Add auto import java.util for UDF code block > > > Key: CASSANDRA-11392 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11392 > Project: Cassandra > Issue Type: Improvement > Components: CQL > Environment: C* 3.4 >Reporter: DOAN DuyHai >Priority: Minor > Fix For: 3.6 > > Attachments: patch.txt > > > Right now, when creating Java source code for UDF, since we cannot define > import, we need to use fully qualified class name, ex: > {noformat} > CREATE FUNCTION toSet(li list) > CALLED ON NULL INPUT > RETURNS text > LANGUAGE java > AS $$ > java.util.Set set = new java.util.HashSet(); > for(String txt: list) { > set.add(txt); > } > return set; > $$; > {noformat} > Classes from {{java.util}} package are so commonly used that it makes > developer life easier to import automatically {{java.util.*}} in the > {{JavaUDF}} base class so that developers don't need to use FQCN for common > classes. > The only drawback I can see is the risk of class name clash but since: > 1. it is not allow to create new class > 2. classes that can be used in UDF are restricted > I don't see serious clash name issues either > [~snazy] WDYT ? > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-11392) Add auto import java.util for UDF code block
[ https://issues.apache.org/jira/browse/CASSANDRA-11392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Stupp updated CASSANDRA-11392: - Reviewer: Robert Stupp > Add auto import java.util for UDF code block > > > Key: CASSANDRA-11392 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11392 > Project: Cassandra > Issue Type: Improvement > Components: CQL > Environment: C* 3.4 >Reporter: DOAN DuyHai >Priority: Minor > Fix For: 3.6 > > Attachments: patch.txt > > > Right now, when creating Java source code for UDF, since we cannot define > import, we need to use fully qualified class name, ex: > {noformat} > CREATE FUNCTION toSet(li list) > CALLED ON NULL INPUT > RETURNS text > LANGUAGE java > AS $$ > java.util.Set set = new java.util.HashSet(); > for(String txt: list) { > set.add(txt); > } > return set; > $$; > {noformat} > Classes from {{java.util}} package are so commonly used that it makes > developer life easier to import automatically {{java.util.*}} in the > {{JavaUDF}} base class so that developers don't need to use FQCN for common > classes. > The only drawback I can see is the risk of class name clash but since: > 1. it is not allow to create new class > 2. classes that can be used in UDF are restricted > I don't see serious clash name issues either > [~snazy] WDYT ? > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-11392) Add auto import java.util for UDF code block
[ https://issues.apache.org/jira/browse/CASSANDRA-11392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] DOAN DuyHai updated CASSANDRA-11392: Attachment: patch.txt Patch attached Just adding {{import java.util.*}} in the {{JavaSourceUDF.txt}} template file and added an unit test to check that it works > Add auto import java.util for UDF code block > > > Key: CASSANDRA-11392 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11392 > Project: Cassandra > Issue Type: Improvement > Components: CQL > Environment: C* 3.4 >Reporter: DOAN DuyHai >Priority: Minor > Fix For: 3.6 > > Attachments: patch.txt > > > Right now, when creating Java source code for UDF, since we cannot define > import, we need to use fully qualified class name, ex: > {noformat} > CREATE FUNCTION toSet(li list) > CALLED ON NULL INPUT > RETURNS text > LANGUAGE java > AS $$ > java.util.Set set = new java.util.HashSet(); > for(String txt: list) { > set.add(txt); > } > return set; > $$; > {noformat} > Classes from {{java.util}} package are so commonly used that it makes > developer life easier to import automatically {{java.util.*}} in the > {{JavaUDF}} base class so that developers don't need to use FQCN for common > classes. > The only drawback I can see is the risk of class name clash but since: > 1. it is not allow to create new class > 2. classes that can be used in UDF are restricted > I don't see serious clash name issues either > [~snazy] WDYT ? > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-11392) Add auto import java.util for UDF code block
[ https://issues.apache.org/jira/browse/CASSANDRA-11392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] DOAN DuyHai updated CASSANDRA-11392: Fix Version/s: 3.6 Reproduced In: 3.4 Status: Patch Available (was: Open) > Add auto import java.util for UDF code block > > > Key: CASSANDRA-11392 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11392 > Project: Cassandra > Issue Type: Improvement > Components: CQL > Environment: C* 3.4 >Reporter: DOAN DuyHai >Priority: Minor > Fix For: 3.6 > > > Right now, when creating Java source code for UDF, since we cannot define > import, we need to use fully qualified class name, ex: > {noformat} > CREATE FUNCTION toSet(li list) > CALLED ON NULL INPUT > RETURNS text > LANGUAGE java > AS $$ > java.util.Set set = new java.util.HashSet(); > for(String txt: list) { > set.add(txt); > } > return set; > $$; > {noformat} > Classes from {{java.util}} package are so commonly used that it makes > developer life easier to import automatically {{java.util.*}} in the > {{JavaUDF}} base class so that developers don't need to use FQCN for common > classes. > The only drawback I can see is the risk of class name clash but since: > 1. it is not allow to create new class > 2. classes that can be used in UDF are restricted > I don't see serious clash name issues either > [~snazy] WDYT ? > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-11392) Add auto import java.util for UDF code block
[ https://issues.apache.org/jira/browse/CASSANDRA-11392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-11392: - Priority: Minor (was: Major) > Add auto import java.util for UDF code block > > > Key: CASSANDRA-11392 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11392 > Project: Cassandra > Issue Type: Improvement > Components: CQL > Environment: C* 3.4 >Reporter: DOAN DuyHai >Priority: Minor > > Right now, when creating Java source code for UDF, since we cannot define > import, we need to use fully qualified class name, ex: > {noformat} > CREATE FUNCTION toSet(li list) > CALLED ON NULL INPUT > RETURNS text > LANGUAGE java > AS $$ > java.util.Set set = new java.util.HashSet(); > for(String txt: list) { > set.add(txt); > } > return set; > $$; > {noformat} > Classes from {{java.util}} package are so commonly used that it makes > developer life easier to import automatically {{java.util.*}} in the > {{JavaUDF}} base class so that developers don't need to use FQCN for common > classes. > The only drawback I can see is the risk of class name clash but since: > 1. it is not allow to create new class > 2. classes that can be used in UDF are restricted > I don't see serious clash name issues either > [~snazy] WDYT ? > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-11392) Add auto import java.util for UDF code block
[ https://issues.apache.org/jira/browse/CASSANDRA-11392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] DOAN DuyHai updated CASSANDRA-11392: Summary: Add auto import java.util for UDF code block (was: Add IMPORT block or auto import java.util for UDF code block) > Add auto import java.util for UDF code block > > > Key: CASSANDRA-11392 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11392 > Project: Cassandra > Issue Type: Improvement > Components: CQL > Environment: C* 3.4 >Reporter: DOAN DuyHai > > Right now, when creating Java source code for UDF, since we cannot define > import, we need to use fully qualified class name, ex: > {noformat} > CREATE FUNCTION toSet(li list) > CALLED ON NULL INPUT > RETURNS text > LANGUAGE java > AS $$ > java.util.Set set = new java.util.HashSet(); > for(String txt: list) { > set.add(txt); > } > return set; > $$; > {noformat} > Classes from {{java.util}} package are so commonly used that it makes > developer life easier to import automatically {{java.util.*}} in the > {{JavaUDF}} base class so that developers don't need to use FQCN for common > classes. > The only drawback I can see is the risk of class name clash but since: > 1. it is not allow to create new class > 2. classes that can be used in UDF are restricted > I don't see serious clash name issues either > [~snazy] WDYT ? > -- This message was sent by Atlassian JIRA (v6.3.4#6332)