Skip to content

Commit 15267fa

Browse files
linmagithzxa21
authored andcommitted
Fix the review comments from Prashanth.
1 parent 84c44f5 commit 15267fa

File tree

4 files changed

+87
-79
lines changed

4 files changed

+87
-79
lines changed

.clang-format

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ TabWidth: 2
88

99
# No tabs
1010
UseTab: Never
11+
12+
# Don't automatically derive the alignment of & and *
13+
DerivePointerAlignment: false
14+
15+
# Always align pointer and reference to the right
16+
PointerAlignment: Right

src/binder/bind_node_visitor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ void BindNodeVisitor::Visit(expression::FunctionExpression *expr) {
203203
// we have to do the string comparison to find out the corresponding
204204
// DatePartType when scanning every tuple.
205205
auto func_name = expr->GetFuncName();
206-
if (func_name == "date_trunc" or func_name == "extract") {
206+
if (func_name == "date_trunc" || func_name == "extract") {
207207
// Check the type of the first argument. Should be VARCHAR
208208
auto date_part = expr->GetChild(0);
209209
if (date_part->GetValueType() != type::TypeId::VARCHAR) {

src/codegen/type/integer_type.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,8 @@ struct Modulo : public TypeSystem::BinaryOperator {
377377
};
378378

379379
// DateTrunc
380+
// TODO(lma): Move this to the Timestamp type once the function lookup logic is
381+
// corrected.
380382
struct DateTrunc : public TypeSystem::BinaryOperator {
381383
bool SupportsTypes(const Type &left_type,
382384
const Type &right_type) const override {

0 commit comments

Comments
 (0)