hussein-awala commented on code in PR #64610:
URL: https://github.com/apache/airflow/pull/64610#discussion_r3539948671
##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/asset_events.py:
##########
@@ -120,13 +176,32 @@ def get_asset_event_by_asset_alias(
before: Annotated[UtcDateTime | None, Query(description="The end of the
time range")] = None,
ascending: Annotated[bool, Query(description="Whether to sort results in
ascending order")] = True,
limit: Annotated[int | None, Query(description="The maximum number of
results to return")] = None,
+ partition_key: Annotated[
+ str | None,
+ Query(description="Exact partition key filter."),
+ ] = None,
+ partition_key_pattern: Annotated[
+ str | None,
+ Query(
+ description="Partition key regex filter. Uses database-native
regex "
+ "(PostgreSQL ~ operator, MySQL REGEXP, SQLite re.match). "
+ "Note: on SQLite, matching is anchored at the start of the string."
+ ),
+ ] = None,
Review Comment:
Good catch, they were different when I started the implementation but it is
not the case now.
The execution routes now depend on the shared
`QueryAssetEventPartitionKeyFilter` / `QueryAssetEventPartitionKeyRegex`,
applied via a filters argument on the SQL helper. The inline `Query(...)`
params and the `_validate_partition_key_params` helper are gone, so validation
(gate + regex compile) lives in one place.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]