Aircloak / aircloak

This repository contains the Aircloak Air frontend as well as the code for our Cloak query and anonymization platform
2 stars 0 forks source link

Constant range example not valid in doc #4776

Closed sebastian closed 3 years ago

sebastian commented 3 years ago

In the constant ranges restrictions doc (https://github.com/Aircloak/aircloak/blob/master/air/priv/static/docs/sql/restrictions.md#constant-ranges) we show examples of valid and invalid queries. A query we say is valid is:

SELECT COUNT(*) FROM table WHERE column1 + 1 >= column2 - 1

These queries are however not valid, as they hit our clear expression restrictions. Case in point is the following query on the BankTransactions data source:

SELECT count(*), count_noise(*) FROM transactions WHERE amount - 1 >= zip + 1

Proposed fix:

edongashi commented 3 years ago

Is the following also invalid?

SELECT COUNT(*) FROM table WHERE column1 + 1 <> column2 - 1

Edit: Yes, this also fails.

edongashi commented 3 years ago

Please close only after ensuring the document is correct.