Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

We are using Hive 2.1.1 and NULLIF is supported in 2.3.0 onwards #758

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion edx/analytics/tasks/enterprise/enterprise_enrollments.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def insert_query(self):
consent.granted AS consent_granted,
grades.letter_grade,
CASE
WHEN grades.passed_timestamp IS NOT NULL AND NULLIF(grades.letter_grade,'') IS NOT NULL THEN 1
WHEN grades.passed_timestamp IS NOT NULL AND grades.letter_grade <> '' AND grades.letter_grade IS NOT NULL THEN 1
ELSE 0
END AS has_passed,
grades.passed_timestamp,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
course_id,user_id,current_enrollment_mode,current_enrollment_is_active,first_enrollment_mode,first_enrollment_time,last_unenrollment_time,first_verified_enrollment_time,first_credit_enrollment_time,end_time
edX/Open_DemoX/edx_demo_course,1,honor,0,honor,2014-08-01 17:09:59.941616,2014-08-01 18:34:05.474003,,,2014-08-07 00:00:00.000000
course-v1:edX+Open_DemoX+edx_demo_course2,1,honor,1,honor,2014-08-05 18:34:05.474003,,,,2014-08-07 00:00:00.000000
edX/Open_DemoX/edx_demo_course,2,audit,0,audit,2014-08-01 17:10:04.587707,2014-08-04 18:34:05.474003,,,2014-08-07 00:00:00.000000
course-v1:edX+Open_DemoX+edx_demo_course2,2,verified,1,verified,2014-08-03 18:34:05.474003,,2014-08-03 18:34:05.474003,,2014-08-07 00:00:00.000000
edX/Open_DemoX/edx_demo_course,3,verified,0,verified,2014-08-01 17:10:07.989504,2014-08-05 18:34:05.474003,2014-08-01 17:10:07.989504,,2014-08-07 00:00:00.000000
edX/Open_DemoX/edx_demo_course,4,honor,0,honor,2014-08-01 17:10:11.440312,2014-08-06 18:34:05.474003,,,2014-08-07 00:00:00.000000
6 changes: 0 additions & 6 deletions edx/analytics/tasks/tests/acceptance/test_enrollments.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ def launch_task(self, enable_course_catalog):
def expected_enrollment_summary_results(self, enable_course_catalog):
"""Returns expected results with course catalog data removed if enable_course_catalog is False."""
expected = [
['course-v1:edX+Open_DemoX+edx_demo_course2', 'All about acceptance testing!', 'edX+Open_DemoX',
datetime.datetime(2016, 6, 1), datetime.datetime(2016, 9, 1), 'self_paced', 'Archived',
'honor', 1, 1, 1, 0],
['course-v1:edX+Open_DemoX+edx_demo_course2', 'All about acceptance testing!', 'edX+Open_DemoX',
datetime.datetime(2016, 6, 1), datetime.datetime(2016, 9, 1), 'self_paced', 'Archived',
'verified', 1, 1, 1, 0],
['edX/Open_DemoX/edx_demo_course', 'All about acceptance testing!', 'edX+Open_DemoX',
datetime.datetime(2016, 9, 1), datetime.datetime(2016, 12, 1), 'instructor_paced', 'Current',
'honor', 0, 0, 3, 2],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ def expected_enterprise_enrollment_results(self):
'US', None, None, None, 'Percentage, 100 (#6)', 0.85, 300.00, 56.00, None],

['0381d3cb033846d48a5cb1475b589d7f', 'Enterprise 1', 16, 5, 'course-v1:edX+Testing102x+1T2017',
datetime.datetime(2019, 9, 4, 21, 8, 8), 'verified', 1, '', 0,
datetime.datetime(2019, 9, 4, 16, 27, 34), 'dory', 1, 'All about acceptance testing Part 3!',
datetime.datetime(2019, 3, 22, 20, 56, 9), 'verified', 1, '', 0,
datetime.datetime(2019, 9, 4, 16, 27, 35), 'dory', 1, 'All about acceptance testing Part 3!',
datetime.datetime(2016, 12, 1, 0, 0), datetime.datetime(2017, 2, 1, 0, 0), 'instructor_paced', '9', 2, 5,
datetime.datetime(2019, 9, 3, 23, 14, 35), '[email protected]', 'test_user6', 'edX+Testing102',
'US', None, None, None, None, 0.3, 100.00, 0, None],
'US', None, None, None, None, 0.3, None, None, None],
]

return [tuple(row) for row in expected]
Expand Down