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

Prashant Kommireddi commented on PHOENIX-2584:
----------------------------------------------



* Can you please change the test case to test the values within the tuple here
{code}
expectedList.add(Storage.tuple(1,3,4));
expectedList.add(Storage.tuple(2,2,2));
{code}

The test case only tests for the number of tuples in the output, not the 
contents
{code}
List<Tuple> actualList = data.get("out");
assertEquals(expectedList.size(), actualList.size());
{code}

* Similar comment for the dumpSchema("A") test, should we enhance that to check 
for contents of tuple read by the Loader?
{code}
+        assertEquals(3, fields.size());
+        assertTrue(fields.get(0).alias.equalsIgnoreCase("ID"));
+        assertTrue(fields.get(0).type == DataType.INTEGER);
+        assertTrue(fields.get(1).alias.equalsIgnoreCase("A_DOUBLE_ARRAY"));
+        assertTrue(fields.get(1).type == DataType.TUPLE);
+        assertTrue(fields.get(2).alias.equalsIgnoreCase("A_VARCHAR_ARRAY"));
+        assertTrue(fields.get(2).type == DataType.TUPLE);
{code}

* Formatting looks  a bit off at a few places, for eg
{code}
final Tuple tuple = 
transformToTuple(record,schema.getFields(),this.columnInfoList);
{code}

You'd ideally want
record,schema.getFields(),<space>this.columnInfoList

* Looks like the aim of this method "newTuple" in TypeUtil is only to create a 
Tuple for arrays, not for any primitive types? The comment seems a bit 
misleading "Creates a new Tuple of the given type". Tuple is a type, I think we 
should rather say "Creates a new Tuple based on type of input object array". 
What do you think?

* "toColumnNameMap" creates a Map with name as the key. How is this used? Could 
not figure from the code

Thanks for the contribution [[email protected]], looks good for the 
most part. 

> Support Array datatype in phoenix-pig module
> --------------------------------------------
>
>                 Key: PHOENIX-2584
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2584
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: maghamravikiran
>            Assignee: maghamravikiran
>             Fix For: 4.7.0
>
>         Attachments: PHOENIX-2584.patch
>
>
> The plan is to map an array data type column to a Tuple in Pig. 
>   



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

Reply via email to