[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-05 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-10365:
--

bq. If anything (new) is failing, I'll fix it all today

Well, there is a lot of failures. Some are due to tests needing to be upgraded 
following the change of driver version on cassci. But at least for the thrift 
tests (that are all failing), it's due to a genuine bug introduced by this 
patch. Thrift dtests are failing with the following stack:
{noformat}
[...]
Caused by: org.apache.cassandra.exceptions.InvalidRequestException: Counters 
are not allowed inside collections: map
at 
org.apache.cassandra.cql3.CQL3Type$Raw$RawCollection.prepare(CQL3Type.java:469) 
~[main/:na]
at 
org.apache.cassandra.schema.CQLTypeParser.parse(CQLTypeParser.java:55) 
~[main/:na]
at 
org.apache.cassandra.schema.SchemaKeyspace.createColumnFromRow(SchemaKeyspace.java:1012)
 ~[main/:na]
at 
org.apache.cassandra.schema.SchemaKeyspace.lambda$fetchColumns$245(SchemaKeyspace.java:996)
 ~[main/:na]
at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_66]
at 
org.apache.cassandra.schema.SchemaKeyspace.fetchColumns(SchemaKeyspace.java:996)
 ~[main/:na]
at 
org.apache.cassandra.schema.SchemaKeyspace.fetchTable(SchemaKeyspace.java:950) 
~[main/:na]
at 
org.apache.cassandra.schema.SchemaKeyspace.fetchTables(SchemaKeyspace.java:929) 
~[main/:na]
at 
org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:892)
 ~[main/:na]
at 
org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspacesOnly(SchemaKeyspace.java:884)
 ~[main/:na]
at 
org.apache.cassandra.schema.SchemaKeyspace.mergeSchema(SchemaKeyspace.java:1274)
 ~[main/:na]
at 
org.apache.cassandra.schema.SchemaKeyspace.mergeSchemaAndAnnounceVersion(SchemaKeyspace.java:1253)
 ~[main/:na]
at 
org.apache.cassandra.service.MigrationManager$1.runMayThrow(MigrationManager.java:491)
 ~[main/:na]
at 
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) 
~[main/:na]
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
~[na:1.8.0_66]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
~[na:1.8.0_66]
{noformat}
The reason is that super columns uses maps internally, and we allow counters in 
super columns. We do indeed not allow counters in collections in CQL, but it's 
not a problem internally and we shouldn't throw in {{CQL3Type.Raw.prepare}} in 
that case anymore. Not entirely sure where to move that check however, so the 
simplest solution might be to use a {{prepareInternal}} version using by schema 
handling that disable this check.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-05 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-10365:
---

bq. That's exactly what I had in mind so lgtm.

Thanks, pushed.

Going through other dtests now. Execution API was not the only thing to change. 
Because of this ticket, metadata API had changes to (to type representations at 
least), but it's all straightforward.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-05 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-10365:
--

Some {{DROP (IF EXISTS) non_existing_keyspace.foo}} statements fail to execute 
(or raise an error).
Fix for that is in [this 
branch|https://github.com/snazy/cassandra/tree/10365-drop-if-exists] and 
cassia's working on [the 
utests|http://cassci.datastax.com/job/snazy-10365-drop-if-exists-testall/1/].

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-05 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-10365:
---

Well, that's annoying. {{prepareInternal}} it is then.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-05 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-10365:
---

[~slebresne] simple fix 
[here|https://github.com/iamaleksey/cassandra/commits/10365-counters-fix], does 
the minimal job to handle just supercolumns with counters, and doesn't go any 
further (and perhaps shouldn't).

Also, entirely unrelated, but it seems like we do allow counters as map keys, 
or at least don't validate it {{RawCollection}} (will follow up after 3.0).

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-05 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-10365:
--

bq. simple fix here, does the minimal job to handle just supercolumns with 
counters

That's exactly what I had in mind so lgtm.

bq. it seems like we do allow counters as map keys, or at least don't validate 
it {{RawCollection}}

Saw that too and not sure why that is. Seems like an oversight though maybe we 
check some place else. We'll have to check.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-05 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-10365:
---

I think Paulo and I fixed most dtest issues, and none should be remaining that 
are caused by this particular commit, so I'm closing the ticket.

Thanks.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-05 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-10365:
--

Well, you're right and I'm right ;)
10365 introduced NPEs on {{DROP TABLE (IF EXISTS)}} and throws 
{{ConfigurationException}} on {{DROP AGGREGATE/FUNCTION IF EXISTS}}.
2.1 and 2.2 are also affected by {{InvalidRequestException}} for {{DROP TYPE IF 
EXISTS}}
(opened CASSANDRA-10658)

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-05 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-10365:
---

[~snazy] I'm not sure that this patch belongs here at all. It's not correcting 
post-10365 behavior, it's changing semantics of {{DROP IF EXISTS}}. Previously, 
when dropping a type or a function with {{IF EXISTS}}, we were still throwing 
if the keyspace itself was missing, no?

Either way, please open a separate ticket, as I'm not sure this is directly 
relevant.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-04 Thread Alexandre Dutra (JIRA)

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

Alexandre Dutra commented on CASSANDRA-10365:
-

Pushed two new commits to the [current 
PR|https://github.com/datastax/java-driver/pull/467] for the Java driver. The 
first one gets rid of the new dependency on jgrapht, and implements topological 
sort from scratch (following Kahn's algorithm); the second one is of less 
interest for this ticket but for the record, it enables lazy resolution of UDTs 
when the dependency graph is incomplete (which can happen when we refresh 
metadata for just a subset of the entire schema).

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-04 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-10365:
---

Opened CASSANDRA-10653 to remove the dependency post 3.0.0. Not going to revert 
to v1 implementation, though, because that was just not good enough.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-04 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-10365:
--

Rebased the UDA/initcond fork of Aleksey's branch. Cassia's currently working 
on 
[testall|http://cassci.datastax.com/view/Dev/view/snazy/job/snazy-10365-uda-3.0-testall/]
 and 
[dtests|http://cassci.datastax.com/view/Dev/view/snazy/job/snazy-10365-uda-3.0-dtest/].

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-10365:
--

Remarks (and some nits) on the last commits:
* I'm actually not that convinced it's worth pulling a new dependency for 
dealing with nested UDT. Granted the previous method was brute-force, but it 
was simple and most likely good enough for all practical purposes. In fact, I 
wouldn't be that surprised to see the previous method be faster than the new 
one on most common cases where you have a vast majority of top-level UDT and a 
few 2-3 level deep ones. And none of this is in a very critical path anyway. 
Avoiding the new {{jgrapht}} dependecy would avoid the questioning of the next 
point.
* {{jgrapht}} uses the "Eclipse Public License". It's mentioned in 
http://www.apache.org/legal/resolved.html#category-b: I'm not sure I understand 
all the requirements but at the very least we should add a mention to the 
{{NOTICE}} file with a link to the library web page. The page also talks about 
"requiring an explicit action by the user" and I'm not sure about that. We 
might be fine here but I can't personally certify so with a high degree of 
confidence.
* Could make {{Types.none()}} return the same singleton object since we do call 
it in a bunch of places.
* It sadens me that the type of the {{Types.types}} field is not 
{{ImmutableMap}} (the reason seems to be to that the {{RawBuilder}} abuses 
{{Types}}).
* In {{SchemaKeyspace.fetchTypes}}, the use of {{Types}} have been expended to 
their fqn ({{org.apache.cassandra.schema.Types}}). Not a big deal but I don't 
think that's necessary.


> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-10365:
--

bq. It's already being pulled by the driver, and we depend on that

Well, I would argue that it's an even worth idea for the driver to pull a 
dependency just for that, but I suppose it's a separate subject. Anyway, I 
maintain that I prefer the old version: the new one feels overkill to me and 
since I'm not familiar with that new library, I actually have less confidence 
in that new version. But it appears to work so you have my opinion and I'll let 
you make the final decision.

The rest lgtm.



> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-04 Thread Adam Holmberg (JIRA)

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

Adam Holmberg commented on CASSANDRA-10365:
---

bq. Rebased the UDA/initcond fork of Aleksey's branch. Cassci's currently 
working on testall and dtests.

[~snazy] those links 404 for me. Can you post a link to your branch?

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-04 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-10365:
--

Oh - yes. Sorry - cleaned up some branches. It's now in CASSANDRA-10650, which 
is based on CASSANDRA-10617, which is based on this ticket.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-04 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-10365:
---

bq, jgrapht uses the "Eclipse Public License"

We have a bunch of libraries that do it so too (JDT, logback, maybe others), so 
this isn't an issue either.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-04 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-10365:
---

bq. I'm actually not that convinced it's worth pulling a new dependency for 
dealing with nested UDT

It's already being pulled by the driver, and we depend on that, so whatevs.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-04 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-10365:
---

bq. Could make Types.none() return the same singleton object since we do call 
it in a bunch of places.

Done. Can do some for other metadata containers, but won't in this ticket.

bq. In SchemaKeyspace.fetchTypes, the use of Types have been expended to their 
fqn (org.apache.cassandra.schema.Types). Not a big deal but I don't think 
that's necessary.

Corrected.

bq. at the very least we should add a mention to the NOTICE file with a link to 
the library web page

Done.

bq. It sadens me that the type of the Types.types field is not ImmutableMap 
(the reason seems to be to that the RawBuilder abuses Types).

Given that it will always realistically be an ImmutableMap, I'm not even 
saddened. Well, just a little bit, but not it actually feels cleaner to me this 
way.

Force-pushed the new commit on top of a rebased branch.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-04 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-10365:
---

[~slebresne] If you don't really mind, I'll leave it as is *for now*. tbh I 
just find v2 conceptually cleaner/simpler. And there might be some value in 
having similar logic on both server and in the java-driver. That said, if 
drivers team decides to pull the dependency and do something else - I'll revert 
too. I'm perfectly fine with revisiting after 3.0.0, and I know Alexandre is 
looking at an alternative option as well, so there is a high likelihood that we 
will in fact ditch the dependency in both the driver and the server.

Committed with updated bundled as 
[340df43fb74f7f3ef021d10ad1b4510636ee3f14|https://github.com/apache/cassandra/commit/340df43fb74f7f3ef021d10ad1b4510636ee3f14]
 to 3.0 and merged with trunk, thanks.

No new unit tests are failing. For dtests, will have to do it live on cassci, 
now that it's just been updated with the correct driver.

If anything (new) is failing, I'll fix it all today, and won't be closing this 
ticket until I'm certain that it's broken nothing.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-10365:
---

Pushed a commit addressing all of review feedback. All incorporated with some 
exceptions:

bq. Why expose/use CQLTypeParser.parseRaw() instead of CQLTypeParse.parse() (In 
SchemaKeyspace.fetchTypes).

That's the only place we use it/need it. To fetch types themselves and resolve 
dependencies.

bq. CQL3Type.UserDefined.toString() doesn't quote stuffs properly (if the udt 
name is a quoted name). SchemaKeyspace.bbToString() has the same problem.

{{SchemaKeyspace.bbToString()}} does not have the same problem. We don't quote 
table, keyspace, type, function, etc. names, and shouldn't be quoting field 
names in {{schema.types}} either, for consistency reasons. Quoting those is the 
job of the driver.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-10365:
---

And on top of those changes pushed a refactor of {{Types.RawBuilder}} so that 
it isn't shit (based loosely on Alexandre's driver code).

As this ticket description is explicitly about type names, I'm fine with 
handling {{initcond}} in a different one, so submitting this for review (will 
update drivers/run CI tomorrow).

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-03 Thread Adam Holmberg (JIRA)

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

Adam Holmberg commented on CASSANDRA-10365:
---

Python integration test is good with latest push, with the exception of the 
broken {{initcond}} assumption.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-03 Thread Alexandre Dutra (JIRA)

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

Alexandre Dutra commented on CASSANDRA-10365:
-

Force-pushed an updated Java driver version 
[here|https://github.com/datastax/java-driver/pull/467] against [Aleksey's 
branch|https://github.com/iamaleksey/cassandra/commits/10365]. Note that 
currently the driver assumes that initconds are stored as blobs. All our unit 
and short tests pass.


> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-03 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-10365:
--

A few remarks on the "allow nested UDTs patch":
* Why expose/use {{CQLTypeParser.parseRaw()}} instead of 
{{CQLTypeParse.parse()}} (In {{SchemaKeyspace.fetchTypes}}).
* I'd prefer keeping the {{Types}} map immutable (even if that means 
"duplicating" the map in the ctor, and even if that's theoretically done 
multiple time in {{Constructor.build()}}: I can't imagine this being a 
performance problem in practice).
* Some comments to explain the difference between {{Types.Builder}} and 
{{Types.Constructor}} would be helpful.
* Nit: not very fond of the naming of {{Types.Builder}} versus 
{{Types.Constructor}}. I'd have called the latter {{RawBuilder}}, or maybe 
{{DependencyResolvingBuilder}}: something that hints at how it differs from the 
former, even if it's vague, rather than a non-descriptive synonim.


> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-02 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-10365:
---

Rebased on top of most recent cassandra-3.0 (otherwise no changes to the 
initial commits) and pushed an extra one that deals with cross-referencing 
UDTs, so that should work now.

Will have another go at it, and incorporate Sylvain's feedback/Robert's code 
tomorrow. Aside from those things, there should be nothing blocking the drivers 
at the moment.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-02 Thread Adam Holmberg (JIRA)

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

Adam Holmberg commented on CASSANDRA-10365:
---

Our integration tests are seeing issues related to UDT frozenness. Most I've 
looked at are characterized by this:

{code}
cassandra@cqlsh:test> create type whatever (a int, b int);
cassandra@cqlsh:test> create TABLE t (k int PRIMARY KEY, m map);
ServerError: 
{code}

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-02 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-10365:
---

bq. Our integration tests are seeing issues related to UDT frozenness.

That was a bug in {{toString()}} of {{Tuple}} and {{UserDefined}}. Force-pushed.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-02 Thread Adam Holmberg (JIRA)

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

Adam Holmberg commented on CASSANDRA-10365:
---

That fixed it. Thanks.
Presently we consider the Python driver ready for integration, pending two 
known issues:
1.) UDT quoting as mentioned by Sylvain
2.) Aggregate initcond to be stored as CQL literal

Once these items are addressed we should have a clean integration test suite.

Latest is still on the driver branch 
[here|https://github.com/datastax/python-driver/tree/422].

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-11-01 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-10365:
--

Apologies for the compilation failure. Fixed it and force-pushed an update.
WRT to the other issues around {{CREATE AGGREGATE}} (e.g. failing tests), we 
definitely need CASSANDRA-10617 to get it working.

Regarding the NPE with the non-existing keyspace: that's a bug for {{CREATE 
AGGREGATE}} and at least {{CREATE TABLE}}. Will open a separate ticket for this.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-10-30 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-10365:
--

For the record, created CASSANDRA-10624 for the "UDT in CQLSSTableWriter" 
problem since I don't think we add a ticket for it.

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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


[jira] [Commented] (CASSANDRA-10365) Store types by their CQL names in schema tables instead of fully-qualified internal class names

2015-10-30 Thread Adam Holmberg (JIRA)

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

Adam Holmberg commented on CASSANDRA-10365:
---

[~snazy] your branch does not build presently. I was working with a tweak to 
get it building. I'm noticing some possible bugs around aggregates (not sure if 
it's because of my incorrect tweak, or something else).
https://gist.github.com/aholmberg/33a19b559e1a3bd003e3

Are you still working this?

> Store types by their CQL names in schema tables instead of fully-qualified 
> internal class names
> ---
>
> Key: CASSANDRA-10365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10365
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>  Labels: client-impacting
> Fix For: 3.0.0
>
>
> Consider saving CQL types names for column, UDF/UDA arguments and return 
> types, and UDT components.



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