Repository: dbt-labs/dbt-core

Issue:
[CT-2698]  `use_approximate_percentile` and `use_discrete_percentile` keys defualt to None but are defined as bool in the protocol
### Is this a new bug in dbt-core?

- [X] I believe this is a new bug in dbt-core
- [X] I have searched the existing issues, and I could not find an existing issue for this bug

### Current Behavior

The default None for `use_approximate_percentile` and `use_discrete_percentile` causes an error. I need to define the bool value for these parameters in the measure. However, I should only assign true or false to these parameters if I need to use them, and they should default to false. 

Current implementation:
```
- name: discrete_order_value_p99
        expr: order_total
        agg: percentile
        agg_params:
          percentile: 0.99
          use_discrete_percentile: True
          use_approximate_percentile: False
        create_metric: true
```

Expected implementation:
```
- name: discrete_order_value_p99
        expr: order_total
        agg: percentile
        agg_params:
          percentile: 0.99
          use_discrete_percentile: True
        create_metric: true
```

### Expected Behavior

I should not need to define true or false explicitly for use_discrete_percentile and use_approximate_percentile. They should default to false. 

### Steps To Reproduce

Define a measure like below and run dbt run.

```
- name: discrete_order_value_p99
        expr: order_total
        agg: percentile
        agg_params:
          percentile: 0.99
          use_discrete_percentile: True
        create_metric: true
```

### Relevant log output

_No response_

### Environment

```markdown
- OS:
- Python:
- dbt:
```


### Which database adapter are you using with dbt?

_No response_

### Additional Context

_No response_


Discussion:
cc @QMalcolm 

Resolving patch:
diff --git a/core/dbt/contracts/graph/semantic_models.py b/core/dbt/contracts/graph/semantic_models.py
--- a/core/dbt/contracts/graph/semantic_models.py
+++ b/core/dbt/contracts/graph/semantic_models.py
@@ -120,8 +120,8 @@ def is_linkable_entity_type(self) -> bool:
 @dataclass
 class MeasureAggregationParameters(dbtClassMixin):
     percentile: Optional[float] = None
-    use_discrete_percentile: Optional[bool] = None
-    use_approximate_percentile: Optional[bool] = None
+    use_discrete_percentile: bool = False
+    use_approximate_percentile: bool = False
 
 
 @dataclass


Test patch:
diff --git a/tests/functional/semantic_models/test_semantic_model_parsing.py b/tests/functional/semantic_models/test_semantic_model_parsing.py
--- a/tests/functional/semantic_models/test_semantic_model_parsing.py
+++ b/tests/functional/semantic_models/test_semantic_model_parsing.py
@@ -29,6 +29,18 @@
       - name: has_revenue
         expr: true
         agg: sum_boolean
+      - name: discrete_order_value_p99
+        expr: order_total
+        agg: percentile
+        agg_params:
+          percentile: 0.99
+          use_discrete_percentile: True
+          use_approximate_percentile: False
+      - name: test_agg_params_optional_are_empty
+        expr: order_total
+        agg: percentile
+        agg_params:
+          percentile: 0.99
 
     dimensions:
       - name: ds
@@ -71,7 +83,7 @@ def test_semantic_model_parsing(self, project):
             semantic_model.node_relation.relation_name
             == f'"dbt"."{project.test_schema}"."fct_revenue"'
         )
-        assert len(semantic_model.measures) == 3
+        assert len(semantic_model.measures) == 5
 
     @pytest.mark.skip("Restore this test when partial parsing is implemented.")
     def test_semantic_model_partial_parsing(self, project):