[jira] Commented: (PIG-1179) Consecutives ORDER BY on the same relation don't work

2010-01-22 Thread Vincent BARAT (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12803863#action_12803863
 ] 

Vincent BARAT commented on PIG-1179:


Actually you are right, there was a typo. But it does not change the issue.
I'll try to give you a sample to reproduce it.
Have you tried it in local mode or clustered mode ? Maybe the issue is only 
present in clustered mode



 Consecutives ORDER BY on the same relation don't work
 -

 Key: PIG-1179
 URL: https://issues.apache.org/jira/browse/PIG-1179
 Project: Pig
  Issue Type: Bug
Affects Versions: 0.5.0
Reporter: Vincent BARAT

 It seems there is a bug in PIG when ORDER BY is used twice on the same 
 relation using ASC and DESC
 I have the following script:
 imei_start = FOREACH sessions GENERATE imei, start;
 imei_starts = GROUP imei_start BY imei;
 imei_retained_period = FOREACH imei_starts {
   ordered_imei_start = ORDER imei_start BY start DESC;
   first_start = LIMIT ordered_imei_start 1;
   rev_ordered_imei_start = ORDER imei_start BY start ASC;
   last_start = LIMIT rev_ordered_imei_start 1;
   GENERATE group, ordered_imei_start, rev_ordered_imei_start;
 };
 ordered_imei_start and rev_ordered_imei_start are actually the same (they are 
 both sorted in the ASC way) and so last_start is always equal to first_start.
 If only one of the 2 ORDER BY is performed, there is no issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (PIG-1179) Consecutives ORDER BY on the same relation don't work

2010-01-19 Thread Richard Ding (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12802550#action_12802550
 ] 

Richard Ding commented on PIG-1179:
---

Vincent,

It seems there is a typo in the script. Do you mean to generate first_start and 
last_start?
 
{code}
mei_start = FOREACH sessions GENERATE imei, start;
imei_starts = GROUP imei_start BY imei;
imei_retained_period = FOREACH imei_starts {
ordered_imei_start = ORDER imei_start BY start DESC; 
first_start = LIMIT ordered_imei_start 1; 
rev_ordered_imei_start = ORDER imei_start BY start ASC; 
last_start = LIMIT rev_ordered_imei_start 1; 
GENERATE group, first_start, last_start; };
{code}

In any case, I am not able to reproduce the bug with Pig 0.5.

 Consecutives ORDER BY on the same relation don't work
 -

 Key: PIG-1179
 URL: https://issues.apache.org/jira/browse/PIG-1179
 Project: Pig
  Issue Type: Bug
Affects Versions: 0.5.0
Reporter: Vincent BARAT

 It seems there is a bug in PIG when ORDER BY is used twice on the same 
 relation using ASC and DESC
 I have the following script:
 imei_start = FOREACH sessions GENERATE imei, start;
 imei_starts = GROUP imei_start BY imei;
 imei_retained_period = FOREACH imei_starts {
   ordered_imei_start = ORDER imei_start BY start DESC;
   first_start = LIMIT ordered_imei_start 1;
   rev_ordered_imei_start = ORDER imei_start BY start ASC;
   last_start = LIMIT rev_ordered_imei_start 1;
   GENERATE group, ordered_imei_start, rev_ordered_imei_start;
 };
 ordered_imei_start and rev_ordered_imei_start are actually the same (they are 
 both sorted in the ASC way) and so last_start is always equal to first_start.
 If only one of the 2 ORDER BY is performed, there is no issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.