I'm new to pyspark and I want to query dataframe when SYMBOL == [] and when SYMBOL == [,]. This is SYMBOL structure.
+------+
|SYMBOL|
+------+
| []|
| []|
| []|
| [,]|
| []|
| [,]|
I try to use something like df.filter(array_contains(df.INFO_CSQ.SYMBOL, None)).show()
it can't query and there is warning.
> cannot resolve 'array_contains(`INFO_CSQ`.`SYMBOL`, NULL)' due to data type mismatch: Null typed values cannot be used as arguments;;
I think maybe this problem come from I use None as argument, but I'm no idea to query this one.
However, this is working when there is value as argument for example df.filter(array_contains(df.INFO_CSQ.Allele, "A")).select("INFO_CSQ.Allele").show()
I fill "A" as argument as result would be like this
+------+
|Allele|
+------+
| [A]|
| [A]|
| [A]|
| [A]|
| [A]|