parse_json transform is redundant? or its test is missing the point?
ifm-pgarner opened this issue · comments
I noticed while implementing #63 that the parse_json
transform seems to be redundant
For example here:
https://github.com/tekumara/fakesnow/blob/main/tests/test_transforms.py#L265-L271
if I remove the .transform(parse_json)
from the test it still passes
it seems that sqlglot dialect="duckdb"
does the parse_json -> JSON
transform itself already
However there are a lot of other test cases in test_transforms.py
which use parse_json
in their test queries, with other transforms applied instead i.e. relying on sqlglot to do it, so maybe I am missing something - perhaps the parse_json
transform is there for a special case that is not being exercised by the corresponding test case?
Possibly related to inconsistency in the docstring example here: https://github.com/tekumara/fakesnow/blob/main/fakesnow/transforms.py#L524-L527 ?
aha I've just seen #62 so this is probably a duplicate of that