[jira] [Updated] (LUCENE-5864) Split BytesRef into BytesRef and BytesRefBuilder

2014-08-01 Thread Adrien Grand (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-5864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adrien Grand updated LUCENE-5864:
-

Attachment: LUCENE-5864.patch

Removed a println that I had added for debugging.

 Split BytesRef into BytesRef and BytesRefBuilder
 

 Key: LUCENE-5864
 URL: https://issues.apache.org/jira/browse/LUCENE-5864
 Project: Lucene - Core
  Issue Type: Bug
Reporter: Adrien Grand
Assignee: Adrien Grand
 Fix For: 4.10

 Attachments: LUCENE-5864.patch, LUCENE-5864.patch, LUCENE-5864.patch


 Follow-up of LUCENE-5836.
 The fact that BytesRef (and CharsRef, IntsRef, LongsRef) can be used as 
 either pointers to a section of a byte[] or as buffers raises issues. The 
 idea would be to keep BytesRef but remove all the buffer methods like 
 copyBytes, grow, etc. and add a new class BytesRefBuilder that wraps a byte[] 
 and a length (but no offset), has grow/copyBytes/copyChars methods and the 
 ability to build BytesRef instances.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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



[jira] [Updated] (LUCENE-5864) Split BytesRef into BytesRef and BytesRefBuilder

2014-07-31 Thread Adrien Grand (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-5864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adrien Grand updated LUCENE-5864:
-

Attachment: LUCENE-5864.patch

Here is a patch. It is quite big given how BytesRef is used across all our APIs 
but I tried to make it minimal: I just splitted BytesRef into BytesRef and 
BytesRefBuilder (same for CharsRef and IntsRef), moved the buffer methods to 
the builder classes and then fixed the compilation errors. Nothing more. 
Lucene/Solr tests and precommit are happy.

 Split BytesRef into BytesRef and BytesRefBuilder
 

 Key: LUCENE-5864
 URL: https://issues.apache.org/jira/browse/LUCENE-5864
 Project: Lucene - Core
  Issue Type: Bug
Reporter: Adrien Grand
Assignee: Adrien Grand
 Fix For: 4.10

 Attachments: LUCENE-5864.patch


 Follow-up of LUCENE-5836.
 The fact that BytesRef (and CharsRef, IntsRef, LongsRef) can be used as 
 either pointers to a section of a byte[] or as buffers raises issues. The 
 idea would be to keep BytesRef but remove all the buffer methods like 
 copyBytes, grow, etc. and add a new class BytesRefBuilder that wraps a byte[] 
 and a length (but no offset), has grow/copyBytes/copyChars methods and the 
 ability to build BytesRef instances.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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



[jira] [Updated] (LUCENE-5864) Split BytesRef into BytesRef and BytesRefBuilder

2014-07-31 Thread Adrien Grand (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-5864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adrien Grand updated LUCENE-5864:
-

Attachment: LUCENE-5864.patch

Here is a new patch, I tried to address Robert's feedback:
 - methods modify the ref directly
 - no more buildUTF8String

 Split BytesRef into BytesRef and BytesRefBuilder
 

 Key: LUCENE-5864
 URL: https://issues.apache.org/jira/browse/LUCENE-5864
 Project: Lucene - Core
  Issue Type: Bug
Reporter: Adrien Grand
Assignee: Adrien Grand
 Fix For: 4.10

 Attachments: LUCENE-5864.patch, LUCENE-5864.patch


 Follow-up of LUCENE-5836.
 The fact that BytesRef (and CharsRef, IntsRef, LongsRef) can be used as 
 either pointers to a section of a byte[] or as buffers raises issues. The 
 idea would be to keep BytesRef but remove all the buffer methods like 
 copyBytes, grow, etc. and add a new class BytesRefBuilder that wraps a byte[] 
 and a length (but no offset), has grow/copyBytes/copyChars methods and the 
 ability to build BytesRef instances.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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