[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-09-01 Thread Daniil Gitelson (JIRA)

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

Daniil Gitelson commented on AVRO-2069:
---

[~nkollar], fixed.

> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-09-01 Thread Daniil Gitelson (JIRA)

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

Daniil Gitelson commented on AVRO-2069:
---

[~nkollar], it is because recently you updated from legacy 
junit.framework.Assert to org.junit.Assert here: 
https://github.com/apache/avro/commit/189368ed485f5577528824dd88856991a51b6918 
:) Nice change! Those deprecations really annoys.
I will sync from master and fix this test.

> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-08-31 Thread Daniil Gitelson (JIRA)

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

Daniil Gitelson commented on AVRO-2069:
---

Great, [~nkollar]! Will it be scheduled to 1.9.0 release?

> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-08-30 Thread Daniil Gitelson (JIRA)

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

Daniil Gitelson commented on AVRO-2069:
---

[~nkollar], sorry, missed them. Fixed.



> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>Assignee: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (AVRO-2070) Tolerate any Number when writing primitive values in Java in GenericDatumWriter

2017-08-29 Thread Daniil Gitelson (JIRA)
Daniil Gitelson created AVRO-2070:
-

 Summary: Tolerate any Number when writing primitive values in Java 
in GenericDatumWriter
 Key: AVRO-2070
 URL: https://issues.apache.org/jira/browse/AVRO-2070
 Project: Avro
  Issue Type: Improvement
Reporter: Daniil Gitelson


Tolerating any Number (instead of concrete Long, Double, Float) makes possible 
to use mutable Number implmentation for performance reasons (specially for 
primitive collection iterations)
Currently, this only works for int only:
{code:java}
  // Here it works
  case INT: out.writeInt(((Number)datum).intValue()); break;
  // This should be replaced with ((Number)datum).longValue() etc
  case LONG:out.writeLong((Long)datum);   break;
  case FLOAT:   out.writeFloat((Float)datum); break;
  case DOUBLE:  out.writeDouble((Double)datum);   break;
{code}




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-08-29 Thread Daniil Gitelson (JIRA)

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

Daniil Gitelson updated AVRO-2069:
--
Description: 
Currently, for primitive types (such as int, long, etc) generated getters and 
setters return and accept java.lang.* boxed (while fields actually holds 
primitive values). This is inefeccient and produces code boilerplate.

Changed this behaviour in pull request: 
https://github.com/apache/avro/pull/243

  was:
Currently, for primitive types (such as int, long, etc) generated getters and 
setters return and accept java.lang.* boxed (while fields actually holds 
primitive values). This is inefeccient and produces code boilerplate.

I propose generating appropriate primitive types.


> Use primitive fields in generated getters & setters in Java code
> 
>
> Key: AVRO-2069
> URL: https://issues.apache.org/jira/browse/AVRO-2069
> Project: Avro
>  Issue Type: Improvement
>Affects Versions: 1.8.2
>Reporter: Daniil Gitelson
>
> Currently, for primitive types (such as int, long, etc) generated getters and 
> setters return and accept java.lang.* boxed (while fields actually holds 
> primitive values). This is inefeccient and produces code boilerplate.
> Changed this behaviour in pull request: 
> https://github.com/apache/avro/pull/243



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (AVRO-2069) Use primitive fields in generated getters & setters in Java code

2017-08-29 Thread Daniil Gitelson (JIRA)
Daniil Gitelson created AVRO-2069:
-

 Summary: Use primitive fields in generated getters & setters in 
Java code
 Key: AVRO-2069
 URL: https://issues.apache.org/jira/browse/AVRO-2069
 Project: Avro
  Issue Type: Improvement
Affects Versions: 1.8.2
Reporter: Daniil Gitelson


Currently, for primitive types (such as int, long, etc) generated getters and 
setters return and accept java.lang.* boxed (while fields actually holds 
primitive values). This is inefeccient and produces code boilerplate.

I propose generating appropriate primitive types.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)