== Parsed Logical Plan == 'Aggregate [unresolvedalias('count(1))] +- Filter ((((lab_test#1056 = GLUCOSE,PANEL) AND (result_datetime#1057 >= cast(2016-12-01 as timestamp))) AND (result_datetime#1057 <= cast(2017-01-01 as timestamp))) AND ((result_value#1058 > range_high#1061) OR (result_value#1058 < range_low#1060))) +- SubqueryAlias dev3_sandbox.chad_rockwell.lab_result +- Relation dev3_sandbox.chad_rockwell.lab_result[patient_id#1055,lab_test#1056,result_datetime#1057,result_value#1058,result_unit#1059,range_low#1060,range_high#1061] parquet == Analyzed Logical Plan == count(1): bigint Aggregate [count(1) AS count(1)#1078L] +- Filter ((((lab_test#1056 = GLUCOSE,PANEL) AND (result_datetime#1057 >= cast(2016-12-01 as timestamp))) AND (result_datetime#1057 <= cast(2017-01-01 as timestamp))) AND ((result_value#1058 > range_high#1061) OR (result_value#1058 < range_low#1060))) +- SubqueryAlias dev3_sandbox.chad_rockwell.lab_result +- Relation dev3_sandbox.chad_rockwell.lab_result[patient_id#1055,lab_test#1056,result_datetime#1057,result_value#1058,result_unit#1059,range_low#1060,range_high#1061] parquet == Optimized Logical Plan == Aggregate [count(1) AS count(1)#1078L] +- Project +- Filter (((((isnotnull(result_datetime#1057) AND isnotnull(lab_test#1056)) AND (result_datetime#1057 >= 2016-12-01 00:00:00)) AND (result_datetime#1057 <= 2017-01-01 00:00:00)) AND (lab_test#1056 = GLUCOSE,PANEL)) AND ((result_value#1058 > range_high#1061) OR (result_value#1058 < range_low#1060))) +- Relation dev3_sandbox.chad_rockwell.lab_result[patient_id#1055,lab_test#1056,result_datetime#1057,result_value#1058,result_unit#1059,range_low#1060,range_high#1061] parquet == Physical Plan == AdaptiveSparkPlan isFinalPlan=false +- == Initial Plan == ColumnarToRow +- PhotonResultStage +- PhotonAgg(limit=None, keys=[], functions=[finalmerge_count(merge count#1081L) AS count(1)#1077L], output=[count(1)#1078L]) +- PhotonShuffleExchangeSource +- PhotonShuffleMapStage +- PhotonShuffleExchangeSink SinglePartition +- PhotonAgg(limit=None, keys=[], functions=[partial_count(1) AS count#1081L], output=[count#1081L]) +- PhotonProject +- PhotonScan parquet dev3_sandbox.chad_rockwell.lab_result[lab_test#1056,result_datetime#1057,result_value#1058,range_low#1060,range_high#1061] DataFilters: [isnotnull(result_datetime#1057), isnotnull(lab_test#1056), (result_datetime#1057 >= 2016-12-01 0..., DictionaryFilters: [((result_datetime#1057 >= 2016-12-01 00:00:00) AND (result_datetime#1057 <= 2017-01-01 00:00:00)..., Format: parquet, Location: PreparedDeltaFileIndex(1 paths)[abfss://datalake@cdpdevwus2dev3sb.dfs.core.windows.net/chad_rockw..., OptionalDataFilters: [], PartitionFilters: [], ReadSchema: struct= 2016-12-01 0... == Photon Explanation == The query is fully supported by Photon.