Add TODO about expression equality comparisons

This commit is contained in:
jussisaurio
2024-11-23 19:44:11 +02:00
parent cfb7e79601
commit 008be10cfd
2 changed files with 9 additions and 0 deletions

View File

@@ -963,6 +963,9 @@ fn inner_loop_source_emit(
}
}
ResultSetColumn::Agg(agg) => {
// TODO: implement a custom equality check for expressions
// there are lots of examples where this breaks, even simple ones like
// sum(x) != SUM(x)
let found = order_by
.iter()
.enumerate()
@@ -1525,6 +1528,9 @@ fn group_by_emit(
}
}
ResultSetColumn::Agg(agg) => {
// TODO: implement a custom equality check for expressions
// there are lots of examples where this breaks, even simple ones like
// sum(x) != SUM(x)
let found = order_by
.iter()
.enumerate()

View File

@@ -568,6 +568,9 @@ pub fn translate_expr(
) -> Result<usize> {
if let Some(precomputed_exprs_to_registers) = precomputed_exprs_to_registers {
for (precomputed_expr, reg) in precomputed_exprs_to_registers.iter() {
// TODO: implement a custom equality check for expressions
// there are lots of examples where this breaks, even simple ones like
// sum(x) != SUM(x)
if expr == *precomputed_expr {
program.emit_insn(Insn::Copy {
src_reg: *reg,