[jira] [Commented] (CASSANDRA-3799) cqlsh: ASSUME should also change how values are sent to cassandra
[ https://issues.apache.org/jira/browse/CASSANDRA-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13598843#comment-13598843 ] Jonathan Ellis commented on CASSANDRA-3799: --- bq. I think it would be ok to just get rid of ASSUME altogether in 2.0. +1. Let's close this and open a new ticket for that. cqlsh: ASSUME should also change how values are sent to cassandra - Key: CASSANDRA-3799 URL: https://issues.apache.org/jira/browse/CASSANDRA-3799 Project: Cassandra Issue Type: New Feature Components: Tools Affects Versions: 1.0.3 Reporter: paul cannon Assignee: Aleksey Yeschenko Priority: Minor Labels: cqlsh cqlsh's ASSUME command currently only changes how query *return* values are deserialized, and never transforms user CQL text before sending to Cassandra. Apparently cassandra-cli also changes how values are interpreted and marshaled for Cassandra, so user expectation is that cqlsh should also do this. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3799) cqlsh: ASSUME should also change how values are sent to cassandra
[ https://issues.apache.org/jira/browse/CASSANDRA-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13598269#comment-13598269 ] Sylvain Lebresne commented on CASSANDRA-3799: - Is this still relevant? In 1.2.2, we've added support for a bunch of blob-other types conversion function, so don't that make ASSUME itself largely unnecessary in the first place? In any case, I'm not fully sure I understand what this ticket is suggesting in practice, but if it involves parsing and changing text queries, then I'm not a fan at all. cqlsh: ASSUME should also change how values are sent to cassandra - Key: CASSANDRA-3799 URL: https://issues.apache.org/jira/browse/CASSANDRA-3799 Project: Cassandra Issue Type: New Feature Components: Tools Affects Versions: 1.0.3 Reporter: paul cannon Assignee: Aleksey Yeschenko Priority: Minor Labels: cqlsh cqlsh's ASSUME command currently only changes how query *return* values are deserialized, and never transforms user CQL text before sending to Cassandra. Apparently cassandra-cli also changes how values are interpreted and marshaled for Cassandra, so user expectation is that cqlsh should also do this. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3799) cqlsh: ASSUME should also change how values are sent to cassandra
[ https://issues.apache.org/jira/browse/CASSANDRA-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13598292#comment-13598292 ] Aleksey Yeschenko commented on CASSANDRA-3799: -- It is now (post-1.2.2) both easier and much less important. As Paul mentioned, we do parse every query now, but I haven't looked into how difficult rewriting them would be. I'll take a look, and if it turns out to be easy-ish, I say let's to it. And if not.. there are more important issues out there. cqlsh: ASSUME should also change how values are sent to cassandra - Key: CASSANDRA-3799 URL: https://issues.apache.org/jira/browse/CASSANDRA-3799 Project: Cassandra Issue Type: New Feature Components: Tools Affects Versions: 1.0.3 Reporter: paul cannon Assignee: Aleksey Yeschenko Priority: Minor Labels: cqlsh cqlsh's ASSUME command currently only changes how query *return* values are deserialized, and never transforms user CQL text before sending to Cassandra. Apparently cassandra-cli also changes how values are interpreted and marshaled for Cassandra, so user expectation is that cqlsh should also do this. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3799) cqlsh: ASSUME should also change how values are sent to cassandra
[ https://issues.apache.org/jira/browse/CASSANDRA-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13598319#comment-13598319 ] Sylvain Lebresne commented on CASSANDRA-3799: - bq. I'll take a look, and if it turns out to be easy-ish, I say let's to it Just to be clear, and while again, I'm not fully sure what you guys want to do here, I'm kind of -1 on having cqlsh rewrite queries (independently of whether it is easy to do or not). It seems to me that we want user to be able to copy-paste queries from cqlsh to their code and vice-versa, and if cqlsh start rewriting queries, this defeats the purpose. Furthermore, if there is a real need for cqlsh to rewrite queries, don't that mean CQL lacks something? cqlsh: ASSUME should also change how values are sent to cassandra - Key: CASSANDRA-3799 URL: https://issues.apache.org/jira/browse/CASSANDRA-3799 Project: Cassandra Issue Type: New Feature Components: Tools Affects Versions: 1.0.3 Reporter: paul cannon Assignee: Aleksey Yeschenko Priority: Minor Labels: cqlsh cqlsh's ASSUME command currently only changes how query *return* values are deserialized, and never transforms user CQL text before sending to Cassandra. Apparently cassandra-cli also changes how values are interpreted and marshaled for Cassandra, so user expectation is that cqlsh should also do this. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3799) cqlsh: ASSUME should also change how values are sent to cassandra
[ https://issues.apache.org/jira/browse/CASSANDRA-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13598332#comment-13598332 ] Aleksey Yeschenko commented on CASSANDRA-3799: -- There isn't a real need now that we have xAsBlob and blobAsX functions - it's more about symmetry. We have ASSUME that works in one direction, but not in the other one. It bothers me a little, but only a little. I think it would be ok to just get rid of ASSUME altogether in 2.0. cqlsh: ASSUME should also change how values are sent to cassandra - Key: CASSANDRA-3799 URL: https://issues.apache.org/jira/browse/CASSANDRA-3799 Project: Cassandra Issue Type: New Feature Components: Tools Affects Versions: 1.0.3 Reporter: paul cannon Assignee: Aleksey Yeschenko Priority: Minor Labels: cqlsh cqlsh's ASSUME command currently only changes how query *return* values are deserialized, and never transforms user CQL text before sending to Cassandra. Apparently cassandra-cli also changes how values are interpreted and marshaled for Cassandra, so user expectation is that cqlsh should also do this. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3799) cqlsh: ASSUME should also change how values are sent to cassandra
[ https://issues.apache.org/jira/browse/CASSANDRA-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13483374#comment-13483374 ] paul cannon commented on CASSANDRA-3799: Just to clarify for others, it might not be as bad as it sounds, since cqlsh already parses every insert, update, and batch, including contained statements. The difficulty is just in making sure that cqlsh can marshal textual values (from user input) and then unmarshal them again, both in the same way that Cassandra will do for the same contexts. cqlsh: ASSUME should also change how values are sent to cassandra - Key: CASSANDRA-3799 URL: https://issues.apache.org/jira/browse/CASSANDRA-3799 Project: Cassandra Issue Type: New Feature Components: Tools Affects Versions: 1.0.3 Reporter: paul cannon Assignee: Aleksey Yeschenko Priority: Minor Labels: cqlsh Fix For: 1.3 cqlsh's ASSUME command currently only changes how query *return* values are deserialized, and never transforms user CQL text before sending to Cassandra. Apparently cassandra-cli also changes how values are interpreted and marshaled for Cassandra, so user expectation is that cqlsh should also do this. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3799) cqlsh: ASSUME should also change how values are sent to cassandra
[ https://issues.apache.org/jira/browse/CASSANDRA-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13482165#comment-13482165 ] Sylvain Lebresne commented on CASSANDRA-3799: - bq. It seems like the entire statement could be processed server side I'm not a fan because I think this kind of type conversion is mostly (to not say only) useful with cqlsh. Now I think this could be fixed in a slightly different way by adding support for prepared statements in cqlsh (though maybe it's already supported, I haven't really looked). If we do, you could have something like: {noformat} cqlsh PREPARE INSERT INTO TABLE (name, column, value) VALUES (?, ?, ?); = prepared statement 0 cqlsh EXECUTE 0 WITH name = bytes('yo), column = bytes('donthis'), value = bytes('onserver') {noformat} The syntax is just an example but the point is that now the EXECUTE itself is not a CQL statement but rather a cqlsh command, and so supporting type conversion functions is trivial. Granted this is slightly more verbose that with the CLI, but doesn't seem to me like it's a big deal, and I think you really only need that when you work with blobs. cqlsh: ASSUME should also change how values are sent to cassandra - Key: CASSANDRA-3799 URL: https://issues.apache.org/jira/browse/CASSANDRA-3799 Project: Cassandra Issue Type: New Feature Components: Tools Affects Versions: 1.0.3 Reporter: paul cannon Assignee: Aleksey Yeschenko Priority: Minor Labels: cqlsh Fix For: 1.3 cqlsh's ASSUME command currently only changes how query *return* values are deserialized, and never transforms user CQL text before sending to Cassandra. Apparently cassandra-cli also changes how values are interpreted and marshaled for Cassandra, so user expectation is that cqlsh should also do this. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3799) cqlsh: ASSUME should also change how values are sent to cassandra
[ https://issues.apache.org/jira/browse/CASSANDRA-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13482366#comment-13482366 ] Edward Capriolo commented on CASSANDRA-3799: I understand the challenges. I think that building things that only python's cqlsh can do is bad form. These things are not going to work for all clients, and this will hurt the language. We will be into a thrift like world where those using hector have tools to work with data (like composites) and those using another language may not. Do you really think CQL will never have functions? I think sooner or later someone is going to ask for trim() or setContains() or whatever. I think they make the schema-less users much happier and can be a big part of the language in the future. cqlsh: ASSUME should also change how values are sent to cassandra - Key: CASSANDRA-3799 URL: https://issues.apache.org/jira/browse/CASSANDRA-3799 Project: Cassandra Issue Type: New Feature Components: Tools Affects Versions: 1.0.3 Reporter: paul cannon Assignee: Aleksey Yeschenko Priority: Minor Labels: cqlsh Fix For: 1.3 cqlsh's ASSUME command currently only changes how query *return* values are deserialized, and never transforms user CQL text before sending to Cassandra. Apparently cassandra-cli also changes how values are interpreted and marshaled for Cassandra, so user expectation is that cqlsh should also do this. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3799) cqlsh: ASSUME should also change how values are sent to cassandra
[ https://issues.apache.org/jira/browse/CASSANDRA-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13481792#comment-13481792 ] Aleksey Yeschenko commented on CASSANDRA-3799: -- Implementing this will require cqlsh to parse every insert, update and batch statement (incl every statement inside it), transform the values in accordance with ASSUME rules and combining the query again before sending it to Cassandra. Is it worth the effort? cqlsh: ASSUME should also change how values are sent to cassandra - Key: CASSANDRA-3799 URL: https://issues.apache.org/jira/browse/CASSANDRA-3799 Project: Cassandra Issue Type: New Feature Components: Tools Affects Versions: 1.0.3 Reporter: paul cannon Assignee: Aleksey Yeschenko Priority: Minor Labels: cqlsh Fix For: 1.3 cqlsh's ASSUME command currently only changes how query *return* values are deserialized, and never transforms user CQL text before sending to Cassandra. Apparently cassandra-cli also changes how values are interpreted and marshaled for Cassandra, so user expectation is that cqlsh should also do this. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-3799) cqlsh: ASSUME should also change how values are sent to cassandra
[ https://issues.apache.org/jira/browse/CASSANDRA-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13481800#comment-13481800 ] Edward Capriolo commented on CASSANDRA-3799: It seems like the entire statement could be processed server side. INSERT INTO TABLE (name,column,value) VALUES (ascii('yo'),ascii('donthis'),ascii('onserver')); I can not image a JDBC client would parse something like SELECT trim(concat('a','b')) from table; on the client side. cqlsh: ASSUME should also change how values are sent to cassandra - Key: CASSANDRA-3799 URL: https://issues.apache.org/jira/browse/CASSANDRA-3799 Project: Cassandra Issue Type: New Feature Components: Tools Affects Versions: 1.0.3 Reporter: paul cannon Assignee: Aleksey Yeschenko Priority: Minor Labels: cqlsh Fix For: 1.3 cqlsh's ASSUME command currently only changes how query *return* values are deserialized, and never transforms user CQL text before sending to Cassandra. Apparently cassandra-cli also changes how values are interpreted and marshaled for Cassandra, so user expectation is that cqlsh should also do this. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira