Details
-
Bug
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
1.18.0
-
None
-
None
-
None
Description
Let's see if someone can help us, we have a problem:
We have a collection in mongo with 58,948 documents, in which a field of the collection is null in 58,270 and with value (not null) 714. In a select, when we join on that collection, it returns the following error:
SQL Error: UNSUPPORTED_OPERATION ERROR: Hash join does not support schema changes in probe side. Prior schema : BatchSchema [fields=[[`CITY_CODE` (VARCHAR:OPTIONAL)], [`COMPANY_CODE` (INT:OPTIONAL)], [`LOCATION_CODE0` (VARCHAR(65535):OPTIONAL)]], selectionVector=NONE] New schema : BatchSchema [fields=[[`CITY_CODE` (VARCHAR:OPTIONAL)], [`COMPANY_CODE` (VARCHAR:OPTIONAL)], [`LOCATION_CODE0` (VARCHAR(65535):OPTIONAL)]], selectionVector=NONE] Unsupported schema change Fragment: 0:0
The problem that I observe is that when the field has so many nulls, it considers it INT, and when it crosses it, it sees that a value is varchar and that is when it gives the error.
1.) How can I solve this problem? I have changed different parameters regarding mongo and nothing makes it work
2.) Why does Drill consider null to be an int? It should not consider it as varchar.
If I make a select only of the COMPANY_CODE field and I try to sort it, it gives me the following error:
SQL Error: INTERNAL_ERROR ERROR: You tried to write a VarChar type when you are using a ValueWriter of type NullableIntWriterImpl.
Fragment: 0:0
Please, refer to logs for more information.
Thank you!!
Attachments
Issue Links
- relates to
-
DRILL-8190 Mongo query: "Schema change not currently supported for schemas with complex types"
- Closed