Fix type encoding issues in CQL queries