{
  "expectation_type" : "expect_column_median_to_be_between",
  "datasets" : [
    {
      "data": {
        "a": [
          1,
          2,
          3,
          4
        ],
        "b": [
          1,
          2,
          2,
          3
        ],
        "c": [
          5,
          7,
          6,
          null
        ]
      },
      "schemas": {
        "spark": {
          "a": "IntegerType",
          "b": "IntegerType",
          "c": "IntegerType"
        }
      },
      "tests": [
        {
          "title": "Positive test, min == max",
          "exact_match_out": false,
          "in": {
            "column": "a",
            "min_value": 2.5,
            "max_value": 2.5
          },
          "out": {
            "success": true,
            "observed_value": 2.5
          }
        },
        {
          "title": "Positive test, null min",
          "exact_match_out": false,
          "in": {
            "column": "a",
            "min_value": null,
            "max_value": 3
          },
          "out": {
            "success": true,
            "observed_value": 2.5
          }
        },
        {
          "title": "Positive test, null max",
          "exact_match_out": false,
          "in": {
            "column": "a",
            "min_value": 2,
            "max_value": null
          },
          "out": {
            "success": true,
            "observed_value": 2.5
          }
        },
        {
          "title": "Negative test, min == max",
          "exact_match_out": false,
          "in": {
            "column": "b",
            "min_value": 5,
            "max_value": 5
          },
          "out": {
            "success": false,
            "observed_value": 2
          }
        },
        {
          "title": "Negative test, null min",
          "exact_match_out": false,
          "in": {
            "column": "b",
            "min_value": null,
            "max_value": 1
          },
          "out": {
            "success": false,
            "observed_value": 2
          }
        },
        {
          "title": "Negative test, null max",
          "exact_match_out": false,
          "in": {
            "column": "b",
            "min_value": 2.5,
            "max_value": null
          },
          "out": {
            "success": false,
            "observed_value": 2
          }
        },
        {
          "title": "Positive Test, missing value in column, exact min and max",
          "exact_match_out": false,
          "in": {
            "column": "c",
            "min_value": 6,
            "max_value": 6,
            "catch_exceptions": true
          },
          "out": {
            "success": true,
            "observed_value": 6
          }
        },
        {
          "title": "Negative Test, missing value in column, COMPLETE result format",
          "exact_match_out": true,
          "in": {
            "column": "c",
            "min_value": 7,
            "max_value": 7,
            "result_format": "COMPLETE"
          },
          "out": {
            "success": false,
            "result": {
              "observed_value": 6.0,
              "element_count": 4,
              "missing_count": 1,
              "missing_percent": 25.0
            }
          }
        },
        {
          "title": "Vacuously true: both min and max null",
          "exact_match_out": false,
          "in": {
            "column": "c",
            "min_value": null,
            "max_value": null,
            "catch_exceptions": true
          },
          "out": {
            "success": true
          }
        }
      ]},
    {
      "data": {
        "empty_column": []
      },
      "schemas": {
        "spark": {
          "empty_column": "IntegerType"
        }
      },
      "tests": [{
        "title": "Test empty column; should be false (no observed value with which to compare)",
        "exact_match_out": false,
        "in": {
          "column": "empty_column",
          "min_value": 0,
          "max_value": 0,
          "catch_exceptions": false
        },
        "out": {
          "success": false,
          "observed_value": null
        }
      }]
  }]
}
