{
  "expectation_type" : "expect_column_max_to_be_between",
  "datasets" : [{
    "data" : {
      "w" : [1, 2, 3, 4, 5, 5, 4, 3, 2, 1],
      "x" : [2, 3, 4, 5, 6, 7, 8, 9, null, null],
      "y" : [1, 1, 1, 2, 2, 2, 3, 3, 3, 4],
      "z" : ["a", "b", "c", "d", "e", null, null, null, null, null],
      "zz" : ["1/1/2016", "1/2/2016", "2/2/2016", "2/2/2016", "3/1/2016", "2/1/2017", null, null, null, null],
      "zzz" : ["1/1/2016", "1/2/2016", "2/2/2016", "2/2/2016", "3/1/2016", "2/1/2017", null, null, null, null],
      "a" : [null, 0, null, null, 1, null, null, 2, null, null],
      "b" : [null, 0, null, null, 2, null, null, 1, null, null]
    },
    "schemas": {
      "sqlite": {
        "w" : "INTEGER",
        "x" : "INTEGER",
        "y" : "INTEGER",
        "z" : "VARCHAR",
        "zz" : "DATETIME",
        "zzz" : "VARCHAR",
        "a" : "INTEGER",
        "b" : "INTEGER"
      },
      "postgresql": {
        "w" : "INTEGER",
        "x" : "INTEGER",
        "y" : "INTEGER",
        "z" : "TEXT",
        "zz" : "TIMESTAMP",
        "zzz" : "TEXT",
        "a" : "INTEGER",
        "b" : "INTEGER"
      }
    },
    "tests" : [{
      "title": "Basic positive test case",
      "exact_match_out" : false,
      "in": {
        "column": "w",
        "result_format": "BASIC",
        "min_value": 4,
        "max_value": 6
      },
      "out": {
        "success": true,
        "observed_value": 5
      }
    },{
      "title": "Basic negative test case",
      "exact_match_out" : false,
      "in": {
        "column": "w",
        "result_format": "BASIC",
        "min_value": null,
        "max_value": 4
      },
      "out": {
        "success": false,
        "observed_value": 5
      }
    },{
      "title": "Test case with result_format=SUMMARY. Also verifies that max_value is inclusive",
      "exact_match_out" : false,
      "in": {
        "column": "w",
        "result_format": "SUMMARY",
        "min_value": 0,
        "max_value": 5
      },
      "out": {
        "success": true,
        "observed_value": 5
      }
    },{
      "title": "Test case with only a lower bound, and a missing value",
      "exact_match_out" : false,
      "in": {
        "column": "x",
        "min_value": 3
      },
      "out": {
        "success": true,
        "observed_value": 9.0
      }
    },{
      "title": "Negative test case with only a lower bound",
      "exact_match_out" : false,
      "in": {
        "column": "w",
        "min_value": 50
      },
      "out": {
        "success": false,
        "observed_value": 5
      }
    },{
      "title": "Test on a series containing dates, with an output_strftime_format value",
      "exact_match_out" : false,
      "suppress_test_for": ["sqlalchemy"],
      "in": {
        "column": "zz",
        "min_value": "2/1/2016",
        "max_value": "3/1/2016",
        "parse_strings_as_datetimes": true,
        "output_strftime_format" : "%m/%d/%Y"
      },
      "out": {
        "success": false,
        "observed_value": "02/01/2017"
      }
    },{
      "title": "Test on a date-like series containing strings",
      "exact_match_out" : false,
      "in": {
        "column": "zzz",
        "min_value": "2/1/2016",
        "max_value": "3/1/2016",
        "parse_strings_as_datetimes": false
      },
      "out": {
        "success": true,
        "observed_value": "3/1/2016"
      }
    },{
      "title": "Test on strings",
      "exact_match_out" : false,
      "in": {
        "column": "z",
        "min_value": "d",
        "max_value": "f"
      },
      "out": {
        "success": true,
        "observed_value": "e"
      }
    }]},
    {
      "data": {
        "empty_column": []
      },
      "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
        }
      }]
  }]
}