Skip to content
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## 2.1.4 - 2026-02
### Common
- table reader optimization

## 2.1.3 - 2026-02
### Runner
- Separate writer from runner, sorting schema to align to written table
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "rialto"
version = "2.1.3"
version = "2.1.4"
description = "Rialto is a framework for building and deploying machine learning features in a scalable and reusable way. It provides a set of tools that make it easy to define and deploy features and models, and it provides a way to orchestrate the execution of these features and models."
authors = [
{ name = "Marek Dobransky", email = "marekdobr@gmail.com" },
Expand Down
4 changes: 1 addition & 3 deletions rialto/common/table_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ def _uppercase_column_names(self, df: DataFrame) -> DataFrame:
:param df: Dataframe
:return: renamed Dataframe
"""
for col in df.columns:
df = df.withColumnRenamed(col, col.upper())
return df
return df.select(*[F.col(c).alias(c.upper()) for c in df.columns])

def _get_latest_available_date(self, df: DataFrame, date_col: str, until: Optional[datetime.date]) -> datetime.date:
if until:
Expand Down
33 changes: 33 additions & 0 deletions tests/common/test_reader.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2022 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest

from rialto.common.table_reader import TableReader


@pytest.fixture
def sample_df(spark):
df = spark.createDataFrame(
[(1, 2.33, "str", 4.55, 5.66), (1, 2.33, "str", 4.55, 5.66), (1, 2.33, "str", 4.55, 5.66)],
schema="a long, b float, c string, d float, e float",
)

return df


def test_uppercase_columns(spark, sample_df):
tr = TableReader(spark)
df = tr._uppercase_column_names(sample_df)
assert df.columns == ["A", "B", "C", "D", "E"]
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.