Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(server): cast filler value in fillna step [TCTC-9419] #2256

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions server/tests/backends/fixtures/fillna/simple_pypika.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
"mongo",
"pandas",
"snowflake",
# TODO: GBQ handles NULL comparisons differently from
# "bigquery_pypika"
],
"step": {
"pipeline": [
{
"name": "ifthenelse",
"if": {
"column": "nullable_name",
# "value": "",
"operator": "isnull"
},
"newColumn": "new_nullable_name",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
exclude:
- mongo
- pandas
- snowflake
step:
pipeline:
- name: select
columns:
- nullable_name
- name: ifthenelse
newColumn: nullable_int_col
if:
column: nullable_name
operator: isnull
then: 'null'
else: 1
- name: fillna
columns:
- nullable_int_col
# 0 as a string
value: "0"
expected:
data:
- nullable_name: null
nullable_int_col: 0
- nullable_name: Ninkasi Ploploplop
nullable_int_col: 1
- nullable_name: Brewdog Nanny State Alcoholvrij
nullable_int_col: 1
- nullable_name: Ardwen Blonde
nullable_int_col: 1
- nullable_name: null
nullable_int_col: 0
- nullable_name: Weihenstephan Hefe Weizen Alcoholarm
nullable_int_col: 1
- nullable_name: Bellfield Lawless Village IPA
nullable_int_col: 1
- nullable_name: Pauwel Kwak
nullable_int_col: 1
- nullable_name: null
nullable_int_col: 0
- nullable_name: Brugse Zot blonde
nullable_int_col: 1
schema:
fields:
- name: nullable_name
type: string
- name: nullable_int_col
type: number
pandas_version: 1.4.0
Loading