[jira] [Commented] (CASSANDRA-10390) inconsistent quoted identifier handling in UDTs

2015-11-10 Thread Jonathan Halliday (JIRA)

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

Jonathan Halliday commented on CASSANDRA-10390:
---

Fair enough. Personally my real code is using java-driver, I need cqlsh 
behaving only well enough for ad-hoc test and debug assistance. From my 
perspective the progress so far is enough to close out the issue.

> inconsistent quoted identifier handling in UDTs
> ---
>
> Key: CASSANDRA-10390
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10390
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
> Environment: 2.2.1
>Reporter: Jonathan Halliday
>Assignee: Sam Tunnicliffe
> Fix For: 2.2.x
>
>
> > create keyspace test with replication = {'class': 'SimpleStrategy', 
> > 'replication_factor': 1 } ;
> > create type if not exists mytype ("my.field" text);
> > desc keyspace; -- observe that mytype is listed
> > create table mytable (pk int primary key, myfield frozen);
> > desc keyspace; -- observe that mytype is listed, but mytable is not.
> > select * from mytable;
> ValueError: Type names and field names can only contain alphanumeric 
> characters and underscores: 'my.field'
> create table myothertable (pk int primary key, "my.field" text);
> select * from myothertable; -- valid
> huh? It's valid to create a field of a table, or a field of a type, with a 
> quoted name containing non-alpha chars, but it's not valid to use a such a 
> type in a table?  I can just about live with that though it seems 
> unnecessarily restrictive, but allowing creation of such a table and then 
> making it invisible/unusable definitely seems wrong.



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


[jira] [Commented] (CASSANDRA-10390) inconsistent quoted identifier handling in UDTs

2015-11-10 Thread Adam Holmberg (JIRA)

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

Adam Holmberg commented on CASSANDRA-10390:
---

Yes. What I did here was enough to avoid blowing up when invalid Python 
identifiers appear as field names. To go as far as what you mention will 
require a lot more work, and change the return type semantics. I punted on that 
because of the level of effort and the fact that it's only come up once in the 
years since UDTs were introduced. If we feel it's worth the effort this can be 
addressed in a follow-on driver ticket.

> inconsistent quoted identifier handling in UDTs
> ---
>
> Key: CASSANDRA-10390
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10390
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
> Environment: 2.2.1
>Reporter: Jonathan Halliday
>Assignee: Sam Tunnicliffe
> Fix For: 2.2.x
>
>
> > create keyspace test with replication = {'class': 'SimpleStrategy', 
> > 'replication_factor': 1 } ;
> > create type if not exists mytype ("my.field" text);
> > desc keyspace; -- observe that mytype is listed
> > create table mytable (pk int primary key, myfield frozen);
> > desc keyspace; -- observe that mytype is listed, but mytable is not.
> > select * from mytable;
> ValueError: Type names and field names can only contain alphanumeric 
> characters and underscores: 'my.field'
> create table myothertable (pk int primary key, "my.field" text);
> select * from myothertable; -- valid
> huh? It's valid to create a field of a table, or a field of a type, with a 
> quoted name containing non-alpha chars, but it's not valid to use a such a 
> type in a table?  I can just about live with that though it seems 
> unnecessarily restrictive, but allowing creation of such a table and then 
> making it invisible/unusable definitely seems wrong.



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


[jira] [Commented] (CASSANDRA-10390) inconsistent quoted identifier handling in UDTs

2015-11-10 Thread Jonathan Halliday (JIRA)

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

Jonathan Halliday commented on CASSANDRA-10390:
---

3.0.0>  select * from mytable;
pk | myfield
+---
  1 | {field_0_: 'foo'}

well, at least it renders something now, that's progress. I'd expect 
{"my.field": 'foo'} rather than the weird field_0_ synthetic identifier, but 
it's good enough for what I need. thanks!

> inconsistent quoted identifier handling in UDTs
> ---
>
> Key: CASSANDRA-10390
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10390
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
> Environment: 2.2.1
>Reporter: Jonathan Halliday
>Assignee: Sam Tunnicliffe
> Fix For: 2.2.x
>
>
> > create keyspace test with replication = {'class': 'SimpleStrategy', 
> > 'replication_factor': 1 } ;
> > create type if not exists mytype ("my.field" text);
> > desc keyspace; -- observe that mytype is listed
> > create table mytable (pk int primary key, myfield frozen);
> > desc keyspace; -- observe that mytype is listed, but mytable is not.
> > select * from mytable;
> ValueError: Type names and field names can only contain alphanumeric 
> characters and underscores: 'my.field'
> create table myothertable (pk int primary key, "my.field" text);
> select * from myothertable; -- valid
> huh? It's valid to create a field of a table, or a field of a type, with a 
> quoted name containing non-alpha chars, but it's not valid to use a such a 
> type in a table?  I can just about live with that though it seems 
> unnecessarily restrictive, but allowing creation of such a table and then 
> making it invisible/unusable definitely seems wrong.



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


[jira] [Commented] (CASSANDRA-10390) inconsistent quoted identifier handling in UDTs

2015-10-30 Thread Adam Holmberg (JIRA)

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

Adam Holmberg commented on CASSANDRA-10390:
---

[PYTHON-413|https://datastax-oss.atlassian.net/browse/PYTHON-413] is in driver 
master. Will be merged with when we commit CASSANDRA-10513. If you want to 
resolve this independently I can find the commit for you, but I assumed we 
would want to minimize driver updates and just let it happen with the above.

> inconsistent quoted identifier handling in UDTs
> ---
>
> Key: CASSANDRA-10390
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10390
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
> Environment: 2.2.1
>Reporter: Jonathan Halliday
>Assignee: Sam Tunnicliffe
> Fix For: 2.2.x
>
>
> > create keyspace test with replication = {'class': 'SimpleStrategy', 
> > 'replication_factor': 1 } ;
> > create type if not exists mytype ("my.field" text);
> > desc keyspace; -- observe that mytype is listed
> > create table mytable (pk int primary key, myfield frozen);
> > desc keyspace; -- observe that mytype is listed, but mytable is not.
> > select * from mytable;
> ValueError: Type names and field names can only contain alphanumeric 
> characters and underscores: 'my.field'
> create table myothertable (pk int primary key, "my.field" text);
> select * from myothertable; -- valid
> huh? It's valid to create a field of a table, or a field of a type, with a 
> quoted name containing non-alpha chars, but it's not valid to use a such a 
> type in a table?  I can just about live with that though it seems 
> unnecessarily restrictive, but allowing creation of such a table and then 
> making it invisible/unusable definitely seems wrong.



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


[jira] [Commented] (CASSANDRA-10390) inconsistent quoted identifier handling in UDTs

2015-10-30 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-10390:
---

[~aholmber] Is it still relevant? Do we have the driver with the fix in C* yet?

> inconsistent quoted identifier handling in UDTs
> ---
>
> Key: CASSANDRA-10390
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10390
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
> Environment: 2.2.1
>Reporter: Jonathan Halliday
>Assignee: Sam Tunnicliffe
> Fix For: 2.2.x
>
>
> > create keyspace test with replication = {'class': 'SimpleStrategy', 
> > 'replication_factor': 1 } ;
> > create type if not exists mytype ("my.field" text);
> > desc keyspace; -- observe that mytype is listed
> > create table mytable (pk int primary key, myfield frozen);
> > desc keyspace; -- observe that mytype is listed, but mytable is not.
> > select * from mytable;
> ValueError: Type names and field names can only contain alphanumeric 
> characters and underscores: 'my.field'
> create table myothertable (pk int primary key, "my.field" text);
> select * from myothertable; -- valid
> huh? It's valid to create a field of a table, or a field of a type, with a 
> quoted name containing non-alpha chars, but it's not valid to use a such a 
> type in a table?  I can just about live with that though it seems 
> unnecessarily restrictive, but allowing creation of such a table and then 
> making it invisible/unusable definitely seems wrong.



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


[jira] [Commented] (CASSANDRA-10390) inconsistent quoted identifier handling in UDTs

2015-09-29 Thread Adam Holmberg (JIRA)

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

Adam Holmberg commented on CASSANDRA-10390:
---

Thanks. I was just looking at the regex and missed the horrifying "arbitrary 
sequence of characters".

> inconsistent quoted identifier handling in UDTs
> ---
>
> Key: CASSANDRA-10390
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10390
> Project: Cassandra
>  Issue Type: Bug
> Environment: 2.2.1
>Reporter: Jonathan Halliday
>Assignee: Sam Tunnicliffe
> Fix For: 2.2.x
>
>
> > create keyspace test with replication = {'class': 'SimpleStrategy', 
> > 'replication_factor': 1 } ;
> > create type if not exists mytype ("my.field" text);
> > desc keyspace; -- observe that mytype is listed
> > create table mytable (pk int primary key, myfield frozen);
> > desc keyspace; -- observe that mytype is listed, but mytable is not.
> > select * from mytable;
> ValueError: Type names and field names can only contain alphanumeric 
> characters and underscores: 'my.field'
> create table myothertable (pk int primary key, "my.field" text);
> select * from myothertable; -- valid
> huh? It's valid to create a field of a table, or a field of a type, with a 
> quoted name containing non-alpha chars, but it's not valid to use a such a 
> type in a table?  I can just about live with that though it seems 
> unnecessarily restrictive, but allowing creation of such a table and then 
> making it invisible/unusable definitely seems wrong.



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


[jira] [Commented] (CASSANDRA-10390) inconsistent quoted identifier handling in UDTs

2015-09-29 Thread Jonathan Halliday (JIRA)

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

Jonathan Halliday commented on CASSANDRA-10390:
---

keep reading, that same doc says... "There is a second kind of identifiers 
called quoted identifiers defined by enclosing an arbitrary sequence of 
characters in double-quotes(")."

> inconsistent quoted identifier handling in UDTs
> ---
>
> Key: CASSANDRA-10390
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10390
> Project: Cassandra
>  Issue Type: Bug
> Environment: 2.2.1
>Reporter: Jonathan Halliday
>Assignee: Sam Tunnicliffe
> Fix For: 2.2.x
>
>
> > create keyspace test with replication = {'class': 'SimpleStrategy', 
> > 'replication_factor': 1 } ;
> > create type if not exists mytype ("my.field" text);
> > desc keyspace; -- observe that mytype is listed
> > create table mytable (pk int primary key, myfield frozen);
> > desc keyspace; -- observe that mytype is listed, but mytable is not.
> > select * from mytable;
> ValueError: Type names and field names can only contain alphanumeric 
> characters and underscores: 'my.field'
> create table myothertable (pk int primary key, "my.field" text);
> select * from myothertable; -- valid
> huh? It's valid to create a field of a table, or a field of a type, with a 
> quoted name containing non-alpha chars, but it's not valid to use a such a 
> type in a table?  I can just about live with that though it seems 
> unnecessarily restrictive, but allowing creation of such a table and then 
> making it invisible/unusable definitely seems wrong.



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


[jira] [Commented] (CASSANDRA-10390) inconsistent quoted identifier handling in UDTs

2015-09-29 Thread Adam Holmberg (JIRA)

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

Adam Holmberg commented on CASSANDRA-10390:
---

Help me out. Why is '.' being considered valid in these identifiers?
https://cassandra.apache.org/doc/cql3/CQL.html#identifiers
I don't think "my.field" matches {{\[a-zA-Z]\[a-zA-Z0-9_]*.}}

> inconsistent quoted identifier handling in UDTs
> ---
>
> Key: CASSANDRA-10390
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10390
> Project: Cassandra
>  Issue Type: Bug
> Environment: 2.2.1
>Reporter: Jonathan Halliday
>Assignee: Sam Tunnicliffe
> Fix For: 2.2.x
>
>
> > create keyspace test with replication = {'class': 'SimpleStrategy', 
> > 'replication_factor': 1 } ;
> > create type if not exists mytype ("my.field" text);
> > desc keyspace; -- observe that mytype is listed
> > create table mytable (pk int primary key, myfield frozen);
> > desc keyspace; -- observe that mytype is listed, but mytable is not.
> > select * from mytable;
> ValueError: Type names and field names can only contain alphanumeric 
> characters and underscores: 'my.field'
> create table myothertable (pk int primary key, "my.field" text);
> select * from myothertable; -- valid
> huh? It's valid to create a field of a table, or a field of a type, with a 
> quoted name containing non-alpha chars, but it's not valid to use a such a 
> type in a table?  I can just about live with that though it seems 
> unnecessarily restrictive, but allowing creation of such a table and then 
> making it invisible/unusable definitely seems wrong.



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


[jira] [Commented] (CASSANDRA-10390) inconsistent quoted identifier handling in UDTs

2015-09-25 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe commented on CASSANDRA-10390:
-

This is a python driver bug, types like the one described are legal & can in 
fact be accessed using the java driver. I've opened 
[https://datastax-oss.atlassian.net/browse/PYTHON-413|PYTHON-413] and we'll 
need to update the bundled driver once that's resolved. 

> inconsistent quoted identifier handling in UDTs
> ---
>
> Key: CASSANDRA-10390
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10390
> Project: Cassandra
>  Issue Type: Bug
> Environment: 2.2.1
>Reporter: Jonathan Halliday
>Assignee: Sam Tunnicliffe
> Fix For: 2.2.x
>
>
> > create keyspace test with replication = {'class': 'SimpleStrategy', 
> > 'replication_factor': 1 } ;
> > create type if not exists mytype ("my.field" text);
> > desc keyspace; -- observe that mytype is listed
> > create table mytable (pk int primary key, myfield frozen);
> > desc keyspace; -- observe that mytype is listed, but mytable is not.
> > select * from mytable;
> ValueError: Type names and field names can only contain alphanumeric 
> characters and underscores: 'my.field'
> create table myothertable (pk int primary key, "my.field" text);
> select * from myothertable; -- valid
> huh? It's valid to create a field of a table, or a field of a type, with a 
> quoted name containing non-alpha chars, but it's not valid to use a such a 
> type in a table?  I can just about live with that though it seems 
> unnecessarily restrictive, but allowing creation of such a table and then 
> making it invisible/unusable definitely seems wrong.



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