Skip to content

Commit fecd2f9

Browse files
committed
Fix return value for \ThriftSQLQuery::wait()
Our docs state `\ThriftSQLQuery::wait()` returns self so that it can be chained if needed so make sure we do that.
1 parent 7d186ae commit fecd2f9

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/ThriftSQL/HiveQuery.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public function wait() {
4848
}
4949

5050
$this->_ready = true;
51+
return $this;
5152
}
5253

5354
public function fetch( $maxRows ) {

src/ThriftSQL/ImpalaQuery.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public function wait() {
5252
} while (true);
5353

5454
$this->_ready = true;
55+
return $this;
5556
}
5657

5758
public function fetch( $maxRows ) {

src/ThriftSQL/Utils/Iterator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,8 @@ public function rewind() {
9696
}
9797
$this->runCount++;
9898

99-
$this->thriftSQLQuery = $this->thriftSQL->query( $this->queryStr );
10099
$this->buffer = array();
101100
$this->location = 0;
102-
$this->thriftSQLQuery->wait();
101+
$this->thriftSQLQuery = $this->thriftSQL->query( $this->queryStr )->wait();
103102
}
104103
}

0 commit comments

Comments
 (0)