@@ -170,11 +170,11 @@ class DecimalComparison
170170
171171 if (c0_is_const && c1_is_const)
172172 {
173- const ColumnConst * c0_const = checkAndGetColumnConst<ColVecA>(c0. get () );
174- const ColumnConst * c1_const = checkAndGetColumnConst<ColVecB>(c1. get () );
173+ const ColumnConst & c0_const = checkAndGetColumnConst<ColVecA>(*c0 );
174+ const ColumnConst & c1_const = checkAndGetColumnConst<ColVecB>(*c1 );
175175
176- A a = c0_const-> template getValue <A>();
177- B b = c1_const-> template getValue <B>();
176+ A a = c0_const. template getValue <A>();
177+ B b = c1_const. template getValue <B>();
178178 UInt8 res = apply<scale_left, scale_right>(a, b, scale);
179179 return DataTypeUInt8 ().createColumnConst (c0->size (), toField (res));
180180 }
@@ -184,17 +184,17 @@ class DecimalComparison
184184
185185 if (c0_is_const)
186186 {
187- const ColumnConst * c0_const = checkAndGetColumnConst<ColVecA>(c0. get () );
188- A a = c0_const-> template getValue <A>();
187+ const ColumnConst & c0_const = checkAndGetColumnConst<ColVecA>(*c0 );
188+ A a = c0_const. template getValue <A>();
189189 if (const ColVecB * c1_vec = checkAndGetColumn<ColVecB>(c1.get ()))
190190 constantVector<scale_left, scale_right>(a, c1_vec->getData (), vec_res, scale);
191191 else
192192 throw Exception (ErrorCodes::LOGICAL_ERROR, " Wrong column in Decimal comparison" );
193193 }
194194 else if (c1_is_const)
195195 {
196- const ColumnConst * c1_const = checkAndGetColumnConst<ColVecB>(c1. get () );
197- B b = c1_const-> template getValue <B>();
196+ const ColumnConst & c1_const = checkAndGetColumnConst<ColVecB>(*c1 );
197+ B b = c1_const. template getValue <B>();
198198 if (const ColVecA * c0_vec = checkAndGetColumn<ColVecA>(c0.get ()))
199199 vectorConstant<scale_left, scale_right>(c0_vec->getData (), b, vec_res, scale);
200200 else
0 commit comments