Tim Armstrong has posted comments on this change.

Change subject: IMPALA-5573: Add decimal codegen in text scanner
......................................................................


Patch Set 2:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/7683/2/be/src/codegen/llvm-codegen.cc
File be/src/codegen/llvm-codegen.cc:

Line 134:   string path;
We shouldn't need to do this (it always won't work on a statically linked 
build). Without this is there some problem resolving the symbols? Generally 
codegen'd code should be able to call any non-inlined functions in the impalad 
binary without doing anything special.


http://gerrit.cloudera.org:8080/#/c/7683/2/be/src/exec/hdfs-scanner-ir.cc
File be/src/exec/hdfs-scanner-ir.cc:

PS2, Line 84: FlowAsFailure
IMO it would be clearer to inline this function at the 3 callsites.


Line 131: Decimal4Value::value_type IrStringToDecimal4(const char* s, int len, 
int type_precision,
What happens if you just return a Decimal4Value?

I'm not sure exactly what will happen but I suspect Clang internally just 
lowers the type to a plain integer type. 

There's already logic to deal with lowered and unlowered types in 
codegen-anyval but I don't think it applies to this code, since it operates on 
the TimestampVal/StringVal/DecimalVal classes used by expresssions.


http://gerrit.cloudera.org:8080/#/c/7683/2/be/src/exec/text-converter.cc
File be/src/exec/text-converter.cc:

Line 234:           case 12:
case 12 seems unnecessary given we have a default case already.


PS2, Line 298:  be casted before storing
Maybe: "be cast to avoid an LLVM type error"


http://gerrit.cloudera.org:8080/#/c/7683/2/be/src/util/string-parser.h
File be/src/util/string-parser.h:

PS2, Line 600: 
             : /// StringToDecimal<T> is too big to be called from IR. These 
are proxy functions
             : /// linked into util library
I would reword this to something like:

// These functions are too large to benefit from inlining.


-- 
To view, visit http://gerrit.cloudera.org:8080/7683
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia65820e969d59094dc92d912a5279fa90f6b179d
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to