teragrep / pth_10

Data Processing Language (DPL) translator for Apache Spark
GNU Affero General Public License v3.0
0 stars 2 forks source link

eval isnull() does not work as expected #262

Open eemhu opened 3 months ago

eemhu commented 3 months ago

Describe the bug

| where isnull(customerId)

returns rows with nulls, but if you try replacing those nulls using if statement, it doesnt work as expected

%dpl
index=sales_inventory earliest="01/01/2017:02:34:19"
| rex4j field=_raw "customerId=(?<customerId>\"([a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12})\")"
| eval new_field = if(isnull(customerId), "Null", customerId)

Expected behavior

How to reproduce

Screenshots

Software version

5.3.0

Desktop (please complete the following information if relevant):

Additional context