Skip to content

fix: Added support to handle empty dataframe - #5497

Merged
ntkathole merged 14 commits into
feast-dev:masterfrom
aniketpalu:feature/handle_empty_df
Jul 23, 2025
Merged

ntkathole merged 14 commits into
feast-dev:masterfrom
aniketpalu:feature/handle_empty_df

Conversation

@aniketpalu

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Adds validation to write_to_online_store and write_to_online_store_async to prevent empty dataframes from being written to the online store.

Changes:

  • Validates completely empty dataframes
  • Validates dataframes with entity data but empty feature columns
  • Works with both df and inputs parameters
  • Throws descriptive ValueError messages

Which issue(s) this PR fixes:

RHOAIENG-27681

Misc

Added comprehensive unit tests in TestEmptyDataFrameValidation class.

Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
@aniketpalu
aniketpalu requested a review from a team as a code owner July 8, 2025 10:38
…ecuted

Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
@aniketpalu
aniketpalu force-pushed the feature/handle_empty_df branch from a6b70d0 to 9ded116 Compare July 9, 2025 05:33
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
@ntkathole ntkathole changed the title Added support to handle empty dataframe fix: Added support to handle empty dataframe Jul 9, 2025
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
Comment thread sdk/python/feast/feature_store.py Resolved
… other functionalities

Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
@aniketpalu
aniketpalu requested a review from ntkathole July 16, 2025 05:13
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
…y FeatureView)

Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
@ntkathole

Copy link
Copy Markdown
Member

@jyejare PTAL

@jyejare jyejare left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK with nitpick comments.

)

# This should not raise an exception
self.store.write_to_online_store(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are not validating that its not raising any exception using with not pytest.raises(Exception_class_name_here).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or may be just warnings context manager.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed comments & optimised code to reuse warning checking logic

… Materialization

Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>

@jyejare jyejare left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to see the new warnings decorator simplifies the warnings catch.

Could you please move the check_warnings to sdk/python/tests/utils directory so that all the tests can use it ?

Signed-off-by: Aniket Paluskar <apaluska@redhat.com>

@jyejare jyejare left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ntkathole ntkathole left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@ntkathole
ntkathole merged commit b8b7831 into feast-dev:master Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants