Skip to content

Commit 2c66abd

Browse files
committed
minor reverts, backwards compat export
1 parent 4639b3c commit 2c66abd

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

datafusion/optimizer/src/push_down_filter.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,13 @@ use datafusion_expr::{
4141
use crate::optimizer::ApplyOrder;
4242
use crate::simplify_expressions::simplify_predicates;
4343
use crate::utils::{
44-
build_schema_remapping, has_all_column_refs, is_restrict_null_predicate,
45-
replace_cols_by_name,
44+
build_schema_remapping, has_all_column_refs, is_restrict_null_predicate
4645
};
4746
use crate::{OptimizerConfig, OptimizerRule};
4847

48+
// Re-export from here for backwards compatibility; it was moved from this module into `utils`.
49+
pub use crate::utils::replace_cols_by_name;
50+
4951
/// Optimizer rule for pushing (moving) filter expressions down in a plan so
5052
/// they are applied as early as possible.
5153
///

datafusion/optimizer/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ fn coerce(expr: Expr, schema: &DFSchema) -> Result<Expr> {
167167
/// # Returns
168168
///
169169
/// The transformed expression with columns replaced according to the map
170-
pub(crate) fn replace_cols_by_name(
170+
pub fn replace_cols_by_name(
171171
e: Expr,
172172
replace_map: &HashMap<String, Expr>,
173173
) -> Result<Expr> {

datafusion/sqllogictest/test_files/spark/aggregate/avg.slt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ FROM (VALUES (0::INT), (0::INT)) AS t(a)
5353
GROUP BY a
5454
ORDER BY a;
5555
----
56-
0 0
56+
0 0

datafusion/sqllogictest/test_files/spark/string/format_string.slt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ SELECT format_string('Value: %d', 42);
7070
Value: 42
7171

7272
## Hexadecimal integer formatting (lowercase)
73-
query T
73+
query T
7474
SELECT format_string('Hex: %x', 255);
7575
----
7676
Hex: ff
@@ -118,7 +118,7 @@ SELECT format_string('Negative: %d', -42);
118118
Negative: -42
119119

120120
# ================================
121-
# Float formatting tests
121+
# Float formatting tests
122122
# ================================
123123

124124
## Basic float formatting
@@ -254,7 +254,7 @@ SELECT format_string('Bool: %b', true);
254254
----
255255
Bool: true
256256

257-
## Boolean uppercase
257+
## Boolean uppercase
258258
query T
259259
SELECT format_string('Bool: %B', false);
260260
----
@@ -370,7 +370,7 @@ SELECT format_string('Minute: %tM', TIMESTAMP '2023-12-25 14:30:45');
370370
----
371371
Minute: 30
372372

373-
## Second formatting
373+
## Second formatting
374374
query T
375375
SELECT format_string('Second: %tS', TIMESTAMP '2023-12-25 14:30:45');
376376
----

0 commit comments

Comments
 (0)