Skip to content

Commit 5653d09

Browse files
authored
Fix develop branch build fail (#803)
* debug develop CI fail * fix develop build * update
1 parent 5a9d9d2 commit 5653d09

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

scripts/image_build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ echo ". /miniconda/etc/profile.d/conda.sh" >> ~/.bashrc
2525
echo "source activate sqlflow-dev" >> ~/.bashrc
2626

2727
# keras.datasets.imdb only works with numpy==1.16.1
28+
# NOTE: shap == 0.30.1 depends on dill but not include dill as it's dependency, need to install manually
2829
source /miniconda/bin/activate sqlflow-dev && python -m pip install \
2930
numpy==1.16.1 \
3031
tensorflow==${TENSORFLOW_VERSION} \
@@ -36,6 +37,7 @@ notebook==6.0.0 \
3637
sqlflow==0.4.0 \
3738
pre-commit \
3839
odps \
40+
dill \
3941
shap \
4042
${PIP_ADD_PACKAGES}
4143

@@ -121,7 +123,7 @@ pip install xgboost==0.90
121123

122124
# 10. install Hadoop to use as the client when writing CSV to hive tables
123125
HADOOP_URL=https://archive.apache.org/dist/hadoop/common/stable/hadoop-${HADOOP_VERSION}.tar.gz
124-
curl -fsSL "$HADOOP_URL" -o /tmp/hadoop.tar.gz
126+
curl -fsSL "$HADOOP_URL" -o /tmp/hadoop.tar.gz
125127
tar -xzf /tmp/hadoop.tar.gz -C /opt/
126128
rm -rf /tmp/hadoop.tar.gz
127129
rm -rf /opt/hadoop-${HADOOP_VERSION}/share/doc

sql/codegen.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ func newFiller(pr *extendedSelect, ds *trainAndValDataset, fts fieldTypes, db *D
117117
if err != nil {
118118
return nil, err
119119
}
120+
if r.Driver == "hive" {
121+
// remove the last ';' which leads to a (hive)ParseException
122+
r.TrainingDatasetSQL = strings.TrimSuffix(r.TrainingDatasetSQL, ";")
123+
r.ValidationDatasetSQL = strings.TrimSuffix(r.ValidationDatasetSQL, ";")
124+
r.PredictionDatasetSQL = strings.TrimSuffix(r.PredictionDatasetSQL, ";")
125+
}
126+
120127
trainResolved, err := resolveTrainClause(&pr.trainClause, &pr.standardSelect, r.connectionConfig)
121128
if err != nil {
122129
return nil, err
@@ -229,14 +236,7 @@ func newFiller(pr *extendedSelect, ds *trainAndValDataset, fts fieldTypes, db *D
229236
return nil, e
230237
}
231238
}
232-
233-
if err == nil && r.Driver == "hive" {
234-
// remove the last ';' which leads to a (hive)ParseException
235-
r.TrainingDatasetSQL = strings.TrimSuffix(r.TrainingDatasetSQL, ";")
236-
r.ValidationDatasetSQL = strings.TrimSuffix(r.ValidationDatasetSQL, ";")
237-
r.PredictionDatasetSQL = strings.TrimSuffix(r.PredictionDatasetSQL, ";")
238-
}
239-
return r, err
239+
return r, e
240240
}
241241

242242
func newConnectionConfig(db *DB) (*connectionConfig, error) {

sql/executor.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ func (cw *logChanWriter) Write(p []byte) (n int, err error) {
353353
if err := cw.wr.Write(cw.prev); err != nil {
354354
return len(cw.prev), err
355355
}
356-
357356
cw.prev = ""
358357
}
359358
return n, nil

0 commit comments

Comments
 (0)