You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by "Yves Langisch (JIRA)" <ji...@apache.org> on 2011/04/06 18:41:05 UTC
[jira] [Created] (GORA-32) Map type with long values generates
non-compilable Java class
Map type with long values generates non-compilable Java class
-------------------------------------------------------------
Key: GORA-32
URL: https://issues.apache.org/jira/browse/GORA-32
Project: Gora
Issue Type: Bug
Components: schema
Affects Versions: 0.1-incubating
Reporter: Yves Langisch
I have the following Avro JSON schema:
{code}
{
"type": "record",
"name": "Request",
"namespace": "ch.test.generated",
"fields" : [
{
"name": "data",
"type": {
"type": "map",
"values": "long"
}
}
]
}
{code}
Compiling the schema I get a Java class that does not compile. The problem is that primitive types are not allowed in generic maps:
{code}
...
public Map<Utf8, long> getData() {
return (Map<Utf8, long>) get(0);
}
...
{code}
The issue seems to be that in the {{GoraCompiler}} class the unboxed types are used.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GORA-32) Map type with long values generates
non-compilable Java class
Posted by "Henry Saputra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GORA-32?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13052783#comment-13052783 ]
Henry Saputra commented on GORA-32:
-----------------------------------
Sorry for the late response, was having some issue with my env. Will apply this by end of day today.
> Map type with long values generates non-compilable Java class
> -------------------------------------------------------------
>
> Key: GORA-32
> URL: https://issues.apache.org/jira/browse/GORA-32
> Project: Gora
> Issue Type: Bug
> Components: schema
> Affects Versions: 0.1-incubating
> Reporter: Yves Langisch
> Attachments: GORA-32.patch, unboxing.patch
>
>
> I have the following Avro JSON schema:
> {
> "type": "record",
> "name": "Request",
> "namespace": "ch.test.generated",
> "fields" : [
> {
> "name": "data",
> "type": {
> "type": "map",
> "values": "long"
> }
> }
> ]
> }
> Compiling the schema I get a Java class that does not compile. The problem is that primitive types are not allowed in generic maps:
> ...
> public Map<Utf8, long> getData() {
> return (Map<Utf8, long>) get(0);
> }
> ...
> The issue seems to be that in the {{GoraCompiler}} class the unboxed types are used.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (GORA-32) Map type with long values generates
non-compilable Java class
Posted by "Yves Langisch (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GORA-32?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yves Langisch updated GORA-32:
------------------------------
Attachment: unboxing.patch
Patch for arrays and maps
> Map type with long values generates non-compilable Java class
> -------------------------------------------------------------
>
> Key: GORA-32
> URL: https://issues.apache.org/jira/browse/GORA-32
> Project: Gora
> Issue Type: Bug
> Components: schema
> Affects Versions: 0.1-incubating
> Reporter: Yves Langisch
> Attachments: unboxing.patch
>
>
> I have the following Avro JSON schema:
> {
> "type": "record",
> "name": "Request",
> "namespace": "ch.test.generated",
> "fields" : [
> {
> "name": "data",
> "type": {
> "type": "map",
> "values": "long"
> }
> }
> ]
> }
> Compiling the schema I get a Java class that does not compile. The problem is that primitive types are not allowed in generic maps:
> ...
> public Map<Utf8, long> getData() {
> return (Map<Utf8, long>) get(0);
> }
> ...
> The issue seems to be that in the {{GoraCompiler}} class the unboxed types are used.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GORA-32) Map type with long values generates
non-compilable Java class
Posted by "Henry Saputra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GORA-32?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13041256#comment-13041256 ]
Henry Saputra commented on GORA-32:
-----------------------------------
Would you mind generating the diff from the http://svn.apache.org/repos/asf/incubator/gora/trunk directory?
> Map type with long values generates non-compilable Java class
> -------------------------------------------------------------
>
> Key: GORA-32
> URL: https://issues.apache.org/jira/browse/GORA-32
> Project: Gora
> Issue Type: Bug
> Components: schema
> Affects Versions: 0.1-incubating
> Reporter: Yves Langisch
> Attachments: unboxing.patch
>
>
> I have the following Avro JSON schema:
> {
> "type": "record",
> "name": "Request",
> "namespace": "ch.test.generated",
> "fields" : [
> {
> "name": "data",
> "type": {
> "type": "map",
> "values": "long"
> }
> }
> ]
> }
> Compiling the schema I get a Java class that does not compile. The problem is that primitive types are not allowed in generic maps:
> ...
> public Map<Utf8, long> getData() {
> return (Map<Utf8, long>) get(0);
> }
> ...
> The issue seems to be that in the {{GoraCompiler}} class the unboxed types are used.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (GORA-32) Map type with long values generates
non-compilable Java class
Posted by "Yves Langisch (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GORA-32?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yves Langisch updated GORA-32:
------------------------------
Attachment: GORA-32.patch
Against SVN.
> Map type with long values generates non-compilable Java class
> -------------------------------------------------------------
>
> Key: GORA-32
> URL: https://issues.apache.org/jira/browse/GORA-32
> Project: Gora
> Issue Type: Bug
> Components: schema
> Affects Versions: 0.1-incubating
> Reporter: Yves Langisch
> Attachments: GORA-32.patch, unboxing.patch
>
>
> I have the following Avro JSON schema:
> {
> "type": "record",
> "name": "Request",
> "namespace": "ch.test.generated",
> "fields" : [
> {
> "name": "data",
> "type": {
> "type": "map",
> "values": "long"
> }
> }
> ]
> }
> Compiling the schema I get a Java class that does not compile. The problem is that primitive types are not allowed in generic maps:
> ...
> public Map<Utf8, long> getData() {
> return (Map<Utf8, long>) get(0);
> }
> ...
> The issue seems to be that in the {{GoraCompiler}} class the unboxed types are used.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (GORA-32) Map type with long values generates
non-compilable Java class
Posted by "Henry Saputra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GORA-32?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henry Saputra resolved GORA-32.
-------------------------------
Resolution: Fixed
Fix Version/s: 0.2-incubating
Submitted patch committed with r1138866. Thanks.
> Map type with long values generates non-compilable Java class
> -------------------------------------------------------------
>
> Key: GORA-32
> URL: https://issues.apache.org/jira/browse/GORA-32
> Project: Gora
> Issue Type: Bug
> Components: schema
> Affects Versions: 0.1-incubating
> Reporter: Yves Langisch
> Fix For: 0.2-incubating
>
> Attachments: GORA-32.patch, unboxing.patch
>
>
> I have the following Avro JSON schema:
> {
> "type": "record",
> "name": "Request",
> "namespace": "ch.test.generated",
> "fields" : [
> {
> "name": "data",
> "type": {
> "type": "map",
> "values": "long"
> }
> }
> ]
> }
> Compiling the schema I get a Java class that does not compile. The problem is that primitive types are not allowed in generic maps:
> ...
> public Map<Utf8, long> getData() {
> return (Map<Utf8, long>) get(0);
> }
> ...
> The issue seems to be that in the {{GoraCompiler}} class the unboxed types are used.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GORA-32) Map type with long values generates
non-compilable Java class
Posted by "Henry Saputra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GORA-32?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053837#comment-13053837 ]
Henry Saputra commented on GORA-32:
-----------------------------------
LGTM.
Patch committed with rev1138866. Thanks al lot.
> Map type with long values generates non-compilable Java class
> -------------------------------------------------------------
>
> Key: GORA-32
> URL: https://issues.apache.org/jira/browse/GORA-32
> Project: Gora
> Issue Type: Bug
> Components: schema
> Affects Versions: 0.1-incubating
> Reporter: Yves Langisch
> Attachments: GORA-32.patch, unboxing.patch
>
>
> I have the following Avro JSON schema:
> {
> "type": "record",
> "name": "Request",
> "namespace": "ch.test.generated",
> "fields" : [
> {
> "name": "data",
> "type": {
> "type": "map",
> "values": "long"
> }
> }
> ]
> }
> Compiling the schema I get a Java class that does not compile. The problem is that primitive types are not allowed in generic maps:
> ...
> public Map<Utf8, long> getData() {
> return (Map<Utf8, long>) get(0);
> }
> ...
> The issue seems to be that in the {{GoraCompiler}} class the unboxed types are used.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GORA-32) Map type with long values generates
non-compilable Java class
Posted by "Yves Langisch (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GORA-32?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051656#comment-13051656 ]
Yves Langisch commented on GORA-32:
-----------------------------------
Still not applied?
> Map type with long values generates non-compilable Java class
> -------------------------------------------------------------
>
> Key: GORA-32
> URL: https://issues.apache.org/jira/browse/GORA-32
> Project: Gora
> Issue Type: Bug
> Components: schema
> Affects Versions: 0.1-incubating
> Reporter: Yves Langisch
> Attachments: GORA-32.patch, unboxing.patch
>
>
> I have the following Avro JSON schema:
> {
> "type": "record",
> "name": "Request",
> "namespace": "ch.test.generated",
> "fields" : [
> {
> "name": "data",
> "type": {
> "type": "map",
> "values": "long"
> }
> }
> ]
> }
> Compiling the schema I get a Java class that does not compile. The problem is that primitive types are not allowed in generic maps:
> ...
> public Map<Utf8, long> getData() {
> return (Map<Utf8, long>) get(0);
> }
> ...
> The issue seems to be that in the {{GoraCompiler}} class the unboxed types are used.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (GORA-32) Map type with long values
generates non-compilable Java class
Posted by "Henry Saputra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GORA-32?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053837#comment-13053837 ]
Henry Saputra edited comment on GORA-32 at 6/23/11 1:16 PM:
------------------------------------------------------------
LGTM.
Patch committed with rev1138866. Thanks.
was (Author: hsaputra):
LGTM.
Patch committed with rev1138866. Thanks al lot.
> Map type with long values generates non-compilable Java class
> -------------------------------------------------------------
>
> Key: GORA-32
> URL: https://issues.apache.org/jira/browse/GORA-32
> Project: Gora
> Issue Type: Bug
> Components: schema
> Affects Versions: 0.1-incubating
> Reporter: Yves Langisch
> Fix For: 0.2-incubating
>
> Attachments: GORA-32.patch, unboxing.patch
>
>
> I have the following Avro JSON schema:
> {
> "type": "record",
> "name": "Request",
> "namespace": "ch.test.generated",
> "fields" : [
> {
> "name": "data",
> "type": {
> "type": "map",
> "values": "long"
> }
> }
> ]
> }
> Compiling the schema I get a Java class that does not compile. The problem is that primitive types are not allowed in generic maps:
> ...
> public Map<Utf8, long> getData() {
> return (Map<Utf8, long>) get(0);
> }
> ...
> The issue seems to be that in the {{GoraCompiler}} class the unboxed types are used.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (GORA-32) Map type with long values generates
non-compilable Java class
Posted by "Yves Langisch (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GORA-32?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yves Langisch updated GORA-32:
------------------------------
Description:
I have the following Avro JSON schema:
{
"type": "record",
"name": "Request",
"namespace": "ch.test.generated",
"fields" : [
{
"name": "data",
"type": {
"type": "map",
"values": "long"
}
}
]
}
Compiling the schema I get a Java class that does not compile. The problem is that primitive types are not allowed in generic maps:
...
public Map<Utf8, long> getData() {
return (Map<Utf8, long>) get(0);
}
...
The issue seems to be that in the {{GoraCompiler}} class the unboxed types are used.
was:
I have the following Avro JSON schema:
{code}
{
"type": "record",
"name": "Request",
"namespace": "ch.test.generated",
"fields" : [
{
"name": "data",
"type": {
"type": "map",
"values": "long"
}
}
]
}
{code}
Compiling the schema I get a Java class that does not compile. The problem is that primitive types are not allowed in generic maps:
{code}
...
public Map<Utf8, long> getData() {
return (Map<Utf8, long>) get(0);
}
...
{code}
The issue seems to be that in the {{GoraCompiler}} class the unboxed types are used.
> Map type with long values generates non-compilable Java class
> -------------------------------------------------------------
>
> Key: GORA-32
> URL: https://issues.apache.org/jira/browse/GORA-32
> Project: Gora
> Issue Type: Bug
> Components: schema
> Affects Versions: 0.1-incubating
> Reporter: Yves Langisch
>
> I have the following Avro JSON schema:
> {
> "type": "record",
> "name": "Request",
> "namespace": "ch.test.generated",
> "fields" : [
> {
> "name": "data",
> "type": {
> "type": "map",
> "values": "long"
> }
> }
> ]
> }
> Compiling the schema I get a Java class that does not compile. The problem is that primitive types are not allowed in generic maps:
> ...
> public Map<Utf8, long> getData() {
> return (Map<Utf8, long>) get(0);
> }
> ...
> The issue seems to be that in the {{GoraCompiler}} class the unboxed types are used.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira