Raw Reflections in mongodb4 throws error

I tried enabling Raw reflections on a MongoDB4 Atlas. It gives me error

MongoQueryException: Query failed with error code 2 and error message 'unknown top level operator: $not' on server mydb-shard-00-00-zzzzz.mongodb.net:27017

Dremio version 4

@Rohithzr Are you able to share the query profile?

18609abc-2e52-43a3-b398-a88b647d2445.zip (32.6 KB)
Please find the attached query profile.

@Rohithzr The error is coming from Mongo, what happens if you run the below directly on Mongo

use keystone-funnel; db.projects.find({"$not": [{"deleted": true}]}, {"_id": 1, "Address": 1, "OwnerId": 1, "AccountId": 1, "Project_Code_Requested__c": 1, "IsWon": 1, "ForecastCategoryName": 1, "ForecastCategory": 1, "StageName": 1, "Budget__c": 1, "Start_Date__c": 1, "CloseDate": 1, "CreatedDate": 1, "Billable__c": 1, "Qb_Project_Code__c": 1, "Name": 1, "Id": 1, "client": 1, "billable": 1, "projectCode": 1, "__v": 1, "isOpenForInvoicing": 1, "isOpenForTimeEntries": 1, "deleted": 1, "leadInfo": 1, "owner": 1, "taskIds": 1, "updatedAt": 1, "managers": 1, "country": 1, "isKatsOrLabsInvolved": 1, "isFixedBill": 1, "salesforce_id": 1, "Closed_Date__c": 1, "Due_Date__c": 1, "CreatedById": 1, "Client_Sponsor__c": 1, "Group__c": 1, "invoicingActive": 1, "attributes": 1, "Old_rate_new_rate": 1, "Invoice_worksteam_title_on_cover": 1, "Address_2": 1, "Attn": 1, "Customer": 1, "Short_Parent_Project_Name": 1, "Payment_terms": 1, "Invoice_Reviewer": 1, "Matter_Name": 1, "lead": 1, "rollupProject": 1, "Matter_Number": 1, "createdAt": 1, "city": 1, "state": 1, "zipCode": 1, "Address_3": 1, "Vendor_ID": 1})

I get the following error

Error: error: {
	"operationTime" : Timestamp(1629398910, 1),
	"ok" : 0,
	"errmsg" : "unknown top level operator: $not",
	"code" : 2,
	"codeName" : "BadValue",
	"$clusterTime" : {
		"clusterTime" : Timestamp(1629398910, 1),
		"signature" : {
			"hash" : BinData(0,"lwGT7VZFCIxXg4k5IwVqpWS4BFc="),
			"keyId" : NumberLong("6951111007561318405")
		}
	}
}

how can this be fixed?

@Rohithzr Seems like there is a not in filter? Can we try using IN (rest of the values) if it is not a large list?

This query is created when I enable Raw Reflections. I am not sure how to edit it.

However I will try the query manually and update you.

I get the error

Error: error: {
	"operationTime" : Timestamp(1629911687, 2),
	"ok" : 0,
	"errmsg" : "unknown top level operator: $in",
	"code" : 2,
	"codeName" : "BadValue",
	"$clusterTime" : {
		"clusterTime" : Timestamp(1629911687, 2),
		"signature" : {
			"hash" : BinData(0,"uWQKNMTcB+vYGJvMYwtac9r8s3E="),
			"keyId" : NumberLong("6951111007561318405")
		}
	}
}

Can you assist me here?

Did you try to change the sql that the VDS generates?
changing for an IN in the sql, as indicated by @balaji.ramaswamy ?

To recreate the reflection and test.