[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2022-02-14 Thread Ekaterina Dimitrova (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17492252#comment-17492252
 ] 

Ekaterina Dimitrova commented on CASSANDRA-17190:
-

The test
user_functions_test.py::TestUserFunctions::test_udf_overload
 is failing now on all branches, except trunk. I opened a ticket CASSANDRA-17383

 and assigned it to [~manish.c.ghildi...@gmail.com] to check it. Thank you

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.1
>
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2022-02-11 Thread Benjamin Lerer (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17490967#comment-17490967
 ] 

Benjamin Lerer commented on CASSANDRA-17190:


Thanks a lot for the patch [~manish.c.ghildi...@gmail.com]

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.1
>
>  Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2022-02-11 Thread Benjamin Lerer (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17490952#comment-17490952
 ] 

Benjamin Lerer commented on CASSANDRA-17190:


CI 
[run|https://app.circleci.com/pipelines/github/blerer/cassandra/265/workflows/08917ba9-b2df-4779-b308-0be0e046e56b]
 the failure is unrelated.

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>  Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2022-02-04 Thread Berenguer Blasi (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17486868#comment-17486868
 ] 

Berenguer Blasi commented on CASSANDRA-17190:
-

Hi, I dropped a couple comments and started a new CI run with the new dtest 
repro [here|https://ci-cassandra.apache.org/job/Cassandra-devbranch/1399/]. 
Let's see how it goes :-)

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2022-01-15 Thread Manish Ghildiyal (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17476567#comment-17476567
 ] 

Manish Ghildiyal commented on CASSANDRA-17190:
--

Created new [PR|https://github.com/apache/cassandra-dtest/pull/173] in 
cassandra-dtest repo.

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2022-01-10 Thread Manish Ghildiyal (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17471980#comment-17471980
 ] 

Manish Ghildiyal commented on CASSANDRA-17190:
--

yeah, would add one.

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2022-01-10 Thread Benjamin Lerer (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17471957#comment-17471957
 ] 

Benjamin Lerer commented on CASSANDRA-17190:


The test does not work anymore as it used to because the patch improve the 
logic determining which function should be used. It now automatically detect 
that it can used the {{overloaded(ascii)}} function. 
This 
[assertion|https://github.com/apache/cassandra-dtest/blob/trunk/user_functions_test.py#L150}}
 can be replaced by an {{assert_none}}.

[~manish.c.ghildi...@gmail.com] if you do a PR for the DTest repo we can run CI 
with both of your branches. :-)   

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2022-01-08 Thread Brandon Williams (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17471176#comment-17471176
 ] 

Brandon Williams commented on CASSANDRA-17190:
--

This is a python dtest failure, so you need to first clone that repo: 
https://github.com/apache/cassandra-dtest/ and then follow the readme to get it 
set up: https://github.com/apache/cassandra-dtest/blob/trunk/README.md

Once that is done, you can run just that test with something like:

{code}
pytest --cassandra-dir=/path/to/cassandra 
user_functions_test.py::TestUserFunctions::test_udf_overload
{code}

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2022-01-08 Thread Manish Ghildiyal (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17471171#comment-17471171
 ] 

Manish Ghildiyal commented on CASSANDRA-17190:
--

What is easiest way to reproduce these failures in my local env?

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2022-01-07 Thread Brandon Williams (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470616#comment-17470616
 ] 

Brandon Williams commented on CASSANDRA-17190:
--

I didn't dig into it, but at a glance there was nothing obvious.  Don't 
hesitate to ask for help if you get stuck!

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2022-01-07 Thread Manish Ghildiyal (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470441#comment-17470441
 ] 

Manish Ghildiyal commented on CASSANDRA-17190:
--

I would look into it soon.

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2022-01-06 Thread Brandon Williams (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470196#comment-17470196
 ] 

Brandon Williams commented on CASSANDRA-17190:
--

Unfortunately, the failures 
([here|https://app.circleci.com/pipelines/github/driftx/cassandra/315/workflows/64b1e141-7948-4a49-9df7-9b9bab42eb63/jobs/2972/tests#failed-test-0],
 
[here|https://app.circleci.com/pipelines/github/driftx/cassandra/315/workflows/8f0c71a5-e377-400a-a698-94ecb5a83c0e/jobs/2978/tests#failed-test-0])
 for the 
[test_udf_overload|https://github.com/apache/cassandra-dtest/blob/trunk/user_functions_test.py#L136]
 dtest are legitimate and caused by this patch, I manually verified as well.

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2022-01-05 Thread Brandon Williams (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17469556#comment-17469556
 ] 

Brandon Williams commented on CASSANDRA-17190:
--

I accidentally ran the dtests there without increasing the resources so those 
failures can be ignored, and everything else looks good, but I also started 
[!https://ci-cassandra.apache.org/job/Cassandra-devbranch/1346/badge/icon!|https://ci-cassandra.apache.org/blue/organizations/jenkins/Cassandra-devbranch/detail/Cassandra-devbranch/1346/pipeline]


> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2022-01-05 Thread Brandon Williams (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17469470#comment-17469470
 ] 

Brandon Williams commented on CASSANDRA-17190:
--

[Circle|https://app.circleci.com/pipelines/github/driftx/cassandra?branch=CASSANDRA-17190&filter=all]
 running.

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2021-12-30 Thread Benjamin Lerer (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17466785#comment-17466785
 ] 

Benjamin Lerer commented on CASSANDRA-17190:


Thanks a lot [~manish.c.ghildi...@gmail.com]. I will mark the ticket as {{Patch 
Available}} to make sure that it reflects its proper state. 

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2021-12-18 Thread Manish Ghildiyal (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17461945#comment-17461945
 ] 

Manish Ghildiyal commented on CASSANDRA-17190:
--

[Here|https://github.com/apache/cassandra/pull/1368] it is(with WIP tag).

 

 

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2021-12-18 Thread Benjamin Lerer (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17461930#comment-17461930
 ] 

Benjamin Lerer commented on CASSANDRA-17190:


[~manish.c.ghildi...@gmail.com] It would be easier for me if you could provide 
a PR even if it is a work in progress. 

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2021-12-17 Thread Manish Ghildiyal (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17461625#comment-17461625
 ] 

Manish Ghildiyal commented on CASSANDRA-17190:
--

I have added a method to StringType

 
{code:java}
public abstract String charsetName();{code}
Different specific types of StringType would return the value accordingly, like 
ASCIIType returns "US-ASCII". This way I don't need to add function for each 
combination (ascii/ascii, ascii/text, text/ascii and text/text) in 
OperationFcts. I just added:
{code:java}
protected ByteBuffer excuteOnStrings(StringType resultType,
StringType leftType,
ByteBuffer left,
StringType rightType,
ByteBuffer right) throws UnsupportedEncodingException
{
throw new UnsupportedOperationException();
}{code}
..and corresponding OPERATION
{code:java}
CONCATENATION('+', "_concat")
{
@Override
protected ByteBuffer executeOnNumerics(NumberType resultType, NumberType 
leftType, ByteBuffer left, NumberType rightType, ByteBuffer right) {
//TODO: not sure what goes here
}

@Override
protected ByteBuffer excuteOnStrings(StringType resultType,
StringType leftType,
ByteBuffer left,
StringType rightType,
ByteBuffer right) throws UnsupportedEncodingException {
return resultType.concat(leftType, left, rightType, right);
}
};{code}
If this is correct approach, would add another OPERATION for '-' too.

An example of CSQL query would also help.

 

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2021-12-12 Thread Benjamin Lerer (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17458026#comment-17458026
 ] 

Benjamin Lerer commented on CASSANDRA-17190:


{quote}
So to understand correctly, this would enable users to write queries like:

'Select col1 + col2 from'
{quote}

Yes or {{SELECT col1 + '-' + col2 FROM ...}}

The method signature looks good. You can probably even make it a full method 
rather than an abstract one. 


> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2021-12-12 Thread Manish Ghildiyal (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17457996#comment-17457996
 ] 

Manish Ghildiyal commented on CASSANDRA-17190:
--

So to understand correctly, this would enable users to write queries like:

'Select col1 + col2 from'

So we basically need to make sense of 'col1 + col2' here.

.and a new method in StringType can be osmerthing like:

 
{code:java}
public abstract ByteBuffer concat(StringType leftType,
ByteBuffer left,
StringType rightType,
ByteBuffer right) throws UnsupportedEncodingException;{code}

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

2021-12-12 Thread Manish Ghildiyal (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-17190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17457923#comment-17457923
 ] 

Manish Ghildiyal commented on CASSANDRA-17190:
--

WIP

> Add support for String contatenation through the "+" operator
> -
>
> Key: CASSANDRA-17190
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Interpreter
>Reporter: Benjamin Lerer
>Assignee: Manish Ghildiyal
>Priority: Normal
>  Labels: AdventCalendar2021, lhf
> Fix For: 4.x
>
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal 
> types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii 
> ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add 
> support for string concatenation you will need to add a new method to 
> {{StringType}} and modify {{OperationFcts}} to add the new functions (one for 
> each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you 
> will need to add a {{getPreferedTypeFor}} method to 
> {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant 
> type based on its content (ascii or not).  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org