This message was deleted.
# general
s
This message was deleted.
b
This could be because of the parameter
druid.generic.useDefaultValueForNull
Copy code
When druid.generic.useDefaultValueForNull = true (legacy mode), Druid instead substitutes a default value, including when NULL values cast to non-nullable types. For example, if druid.generic.useDefaultValueForNull = true, a null VARCHAR cast to BIGINT is converted to a zero.
You could manually change the default and retry.
g
As per this link https://druid.apache.org/docs/latest/configuration/#sql-compatible-null-handling the default is false and it should work.
b
Which version of druid are you in?
g
druid version 27.0.0
i have not changed the value of "druid.generic.useDefaultValueForNull" and as per druid docs by default its false
b
I just ran a test with your input data and i could see correct result:
may be try setting once and then rerun and check, FYI, i just used your source data as inline data and not from S3:
Copy code
{"timestamp":"2016-06-27T00:00:11.080Z","number":,"comment":"empty","namespace":"Main"}
{"timestamp":"2016-06-27T00:00:34.959Z","number":,"comment":"empty","namespace":"Main"}
{"timestamp":"2016-06-27T00:00:36.027Z","number":217,"comment":"non-empty","namespace":"Main"}
g
for me, inline is also giving "0" instead of null
what setting should be changed and where?
b
Set druid.generic.useDefaultValueForNull = false
in common.runtime.properties
g
we are using HELM CHART, and i tried to explicitly set this property but gives error. "druid.generic.useDefaultValueForNull = false". if i try enclosing false in quotes ("false") it does not give error but its not working. Which version of druid you are using?
b
I'm not expert in helm charts, but you'd want to pass
"druid.generic.useDefaultValueForNull": false
. Otoh, as you say, it should be false by default. If you're able to pass it, let us know whether it helps.
g
we are using helm chart from below link https://github.com/apache/druid/blob/master/helm/druid/values.yaml . I am not able to set druid.generic.useDefaultValueForNull = false in this HELM chart
s
Try
druid_generic_useDefaultValueForNull: false
in the
configVars:
section.
Also, the helm chart currently defaults to 24.0.0 in values.yaml:
Copy code
image:
  repository: apache/druid
  tag: 24.0.0
Did you change it?
g
Hi Sergio, I had added the druid_generic_useDefaultValueForNull: false in configVars but it gives error. when i add as druid_generic_useDefaultValueForNull: "false" (false in quotes) it does not give any error but does not work. I have modified the druid verison to 27.0.0. Attached is the helm values.yaml file attached. i have removed the druid_generic_useDefaultValueForNull: false as it was not working. Thanks a lot for your assistance. let me know if any additional info required.
Hi @Sergio Ferragut: let me know the if the above details helps or need any additional info.
s
Hey @Gururaj K.P I'm trying to figure out why that particular config item doesn't work. I haven't used the helm chart in a while, I'll have to try this out... what error does it give you when you set it to
druid_generic_useDefaultValueForNull: false
?
g
Hi @Sergio Ferragut, if i set druid_generic_useDefaultValueForNull: false , then i get the error as pointed in this link https://github.com/argoproj/argo-cd/issues/4391
Hi @Sergio Ferragut, after upgrading to DRUID 28.0.0 the issue is resolved. Looks like a bug in DRUID 27.0.0 which is not supporting druid_generic_useDefaultValueForNull
s
Interesting. Well now we know. 😄