Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/397625 )

Change subject: Revert "Adding renamed tables to sql union statements"
......................................................................

Revert "Adding renamed tables to sql union statements"

This reverts commit 582bcce26e2a16643e1b127834ed825585e33ede.

The temporary table Edit_13457736_15423246 no longer exists, so we can
remove this complexity.

Change-Id: I6327dcaba6ec672f0738d3314ead4ddc9f780a9f
---
M edit/failure_rates_by_type.sql
M edit/failure_types_by_user_type.sql
M edit/rates.sql
M edit/sessions.sql
M edit/success_by_user_type.sql
5 files changed, 4 insertions(+), 84 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-edit-data 
refs/changes/25/397625/1

diff --git a/edit/failure_rates_by_type.sql b/edit/failure_rates_by_type.sql
index a4e04e7..05e2500 100644
--- a/edit/failure_rates_by_type.sql
+++ b/edit/failure_rates_by_type.sql
@@ -55,29 +55,13 @@
             `event_action.saveFailure.type`,
             clientIp,
             event_editingSessionId
-         from Edit_13457736_15423246
-         where
-            event_editor = '{editor}' and
-            ('{wiki}' = 'all' or wiki = '{wiki}') and
-            timestamp >= '{from_timestamp}' and
-            timestamp < '{to_timestamp}'
-
-        union all
-
-         select
-            timestamp,
-            event_action,
-            `event_action.saveFailure.type`,
-            clientIp,
-            event_editingSessionId
          from Edit_13457736
          where
             event_editor = '{editor}' and
             ('{wiki}' = 'all' or wiki = '{wiki}') and
             timestamp >= '{from_timestamp}' and
             timestamp < '{to_timestamp}'
-        
-        ) raw_events
+         ) raw_events
 
          inner join
             (select 'init' as action, 0 as ord
diff --git a/edit/failure_types_by_user_type.sql 
b/edit/failure_types_by_user_type.sql
index edb86cd..6fbfcfc 100644
--- a/edit/failure_types_by_user_type.sql
+++ b/edit/failure_types_by_user_type.sql
@@ -34,19 +34,6 @@
 
    ( select timestamp, `event_user.class`,
    `event_user.editCount`, `event_action.saveFailure.type`
-   from Edit_13457736_15423246
-   where
-       event_editor = '{editor}' and
-       ('{wiki}' = 'all' or wiki = '{wiki}') and
-       timestamp >= '{from_timestamp}' and
-       timestamp < '{to_timestamp}' and
-       `event_action` = 'saveFailure' and
-       `event_action.saveFailure.type` is not null )
-
-    union all
-
-   ( select timestamp, `event_user.class`,
-   `event_user.editCount`, `event_action.saveFailure.type`
    from Edit_13457736
    where
        event_editor = '{editor}' and
@@ -55,7 +42,6 @@
        timestamp < '{to_timestamp}' and
        `event_action` = 'saveFailure' and
        `event_action.saveFailure.type` is not null )
-
 ) saveFailures
 
 group by 1, 2
diff --git a/edit/rates.sql b/edit/rates.sql
index d905cd5..eef80db 100644
--- a/edit/rates.sql
+++ b/edit/rates.sql
@@ -15,7 +15,6 @@
                date(timestamp) as day,
                group_concat(event_action order by timestamp, action_order.ord 
separator '-') as actions
              from (
-
                 select
                    timestamp,
                    event_action,
@@ -37,28 +36,13 @@
                    event_action,
                    clientIp,
                    event_editingSessionId
-                from Edit_13457736_15423246
-                where
-                   event_editor = '{editor}' and
-                   ('{wiki}' = 'all' or wiki = '{wiki}') and
-                   timestamp >= '{from_timestamp}' and
-                   timestamp < '{to_timestamp}'
-
-               union all
-
-                select
-                   timestamp,
-                   event_action,
-                   clientIp,
-                   event_editingSessionId
                 from Edit_13457736
                 where
                    event_editor = '{editor}' and
                    ('{wiki}' = 'all' or wiki = '{wiki}') and
                    timestamp >= '{from_timestamp}' and
                    timestamp < '{to_timestamp}'
-            
-            ) raw_events
+                ) raw_events
 
                 inner join
                    (select 'init' as action, 0 as ord
diff --git a/edit/sessions.sql b/edit/sessions.sql
index 70c817a..130f090 100644
--- a/edit/sessions.sql
+++ b/edit/sessions.sql
@@ -2,24 +2,7 @@
         actions,
         count(*) as repeated
    from (select group_concat(event_action order by timestamp, action_order.ord 
separator '-') as actions
-           from (
-            select timestamp,
-                        event_action,
-                        clientIp,
-                        event_editingSessionId
-
-                   from Edit_13457736_15423246
-                        # NOTE: used to union all with Edit_11448630
-                        # That schema is still used apparently, but very little
-
-                  where event_editor = '{editor}'
-                    and ('{wiki}' = 'all' or wiki = '{wiki}')
-                    and timestamp >= '{from_timestamp}'
-                    and timestamp < '{to_timestamp}'
-
-            union all
-
-            select timestamp,
+           from (select timestamp,
                         event_action,
                         clientIp,
                         event_editingSessionId
@@ -32,7 +15,6 @@
                     and ('{wiki}' = 'all' or wiki = '{wiki}')
                     and timestamp >= '{from_timestamp}'
                     and timestamp < '{to_timestamp}'
-            
                 ) raw_events
 
                     inner join
diff --git a/edit/success_by_user_type.sql b/edit/success_by_user_type.sql
index 546af2a..587944c 100644
--- a/edit/success_by_user_type.sql
+++ b/edit/success_by_user_type.sql
@@ -52,29 +52,13 @@
                    event_editingSessionId,
                    `event_user.class`,
                    `event_user.editCount` as edit_count
-                from Edit_13457736_15423246
-                where
-                   event_editor = '{editor}' and
-                   ('{wiki}' = 'all' or wiki = '{wiki}') and
-                   timestamp >= '{from_timestamp}' and
-                   timestamp < '{to_timestamp}'
-                
-                union all
-
-                select
-                   timestamp,
-                   event_action,
-                   clientIp,
-                   event_editingSessionId,
-                   `event_user.class`,
-                   `event_user.editCount` as edit_count
                 from Edit_13457736
                 where
                    event_editor = '{editor}' and
                    ('{wiki}' = 'all' or wiki = '{wiki}') and
                    timestamp >= '{from_timestamp}' and
                    timestamp < '{to_timestamp}'
-            ) raw_events
+                ) raw_events
 
              inner join
                 (select 'init' as action, 0 as ord

-- 
To view, visit https://gerrit.wikimedia.org/r/397625
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6327dcaba6ec672f0738d3314ead4ddc9f780a9f
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-edit-data
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to