delta-io / delta-sharing

An open protocol for secure data sharing

Home Page:https://delta.io/sharing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Protocol spec - Predicate hint string value escaping clarification

rustyconover opened this issue · comments

In the protocol spec it is unclear what string escaping rules apply to the predicateHints's values.

For example if I want to set a hint that the first_name column is greater than 'D'Angelo' (e.g. https://en.wikipedia.org/wiki/D%27Angelo). I may write:

first_name > 'D'Angelo'

It may better to specify the predicateHints using JSON syntax like:

{"column": "first_name", "operation": "=", "value": "D'Angelo"}

The specification does not give any hints about how values like this will be escaped.

We are deprecating predicateHints, and will be soon to introduce jsonPredicateHints, the doc is ready.

@chakankardb Could you help comment on the "character escaping"?

Okay great! I look forward to using jsonPredicateHints.

If we're using JSON predicate hints there doesn't need to be any discussion about string escaping because JSON by definition is encoded in UTF-8 and the quoting rules are well known.