Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
Signed-off-by: Praneeth Bedapudi <praneeth@bpraneeth.com>
  • Loading branch information
bedapudi6788 committed Feb 14, 2024
1 parent a292d95 commit 142a70b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions liteindex/query_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,19 @@ def process_nested_query(value, prefix):
elif value is None:
where_conditions.append(f"{column} IS NULL")
else:
if schema[column] == "other":
column_type = schema.get(column)
if column_type == "other":
column = f"__hash_{column}"
value = pickle.dumps(value, protocol=pickle.HIGHEST_PROTOCOL)
value = hash_bytes(value)
elif schema[column] == "blob":
elif column_type == "blob":
column = f"__hash_{column}"
value = hash_bytes(value)
elif schema[column] == "datetime":
elif column_type == "datetime":
value = value.timestamp()
elif schema[column] == "boolean":
elif column_type == "boolean":
value = int(value)
elif schema[column] == "compressed_string":
elif column_type == "compressed_string":
value = value.encode()
# TODO: Handle compressed strings
pass
Expand Down

0 comments on commit 142a70b

Please sign in to comment.