Skip to content

Commit

Permalink
Merge pull request FederatedAI#3029 from FederatedAI/develop-1.6.1-do…
Browse files Browse the repository at this point in the history
…c_update

fix
  • Loading branch information
zhihuiwan authored Aug 30, 2021
2 parents 35e5c95 + 5d16598 commit 0e3a72b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 0 additions & 3 deletions python/fate_arch/storage/linkis_hive/_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,12 @@ def count(self, **kwargs):
return count

def collect(self, **kwargs):
from fate_arch.common.log import schedule_logger
if kwargs.get("is_spark"):
from pyspark.sql import SparkSession
session = SparkSession.builder.enableHiveSupport().getOrCreate()
data = session.sql(f"select * from {self._address.database}.{self._address.name}")
schedule_logger('wzh_test').info(data)
return data
else:
schedule_logger('wzh_test').info(f"no spark")
sql = 'select * from {}.{}'.format(self._address.database, self._address.name)
data = self.execute(sql)
for i in data:
Expand Down
2 changes: 1 addition & 1 deletion python/fate_arch/storage/mysql/_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def get_options(self):
return self._options

def count(self, **kwargs):
sql = 'select count(*) from {}'.format(self._name)
sql = 'select count(*) from {}'.format(self._address._name)
try:
self.cur.execute(sql)
self.con.commit()
Expand Down
10 changes: 10 additions & 0 deletions python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,13 @@ llvmlite==0.33.0
phe>=1.4.0
protobuf>=3.6.1
pyarrow==0.17.1

# addtional requirements for fate-client
click>=7.1.2,<8.0.0
loguru>=0.5.1,<0.6.0
ruamel.yaml>=0.16.10,<0.17.0
torch==1.4.0
prettytable>=1.0.0,<2.0.0
setuptools>=50.0,<51.0
sshtunnel>=0.1.5,<0.2.0
colorama>=0.4.4

0 comments on commit 0e3a72b

Please sign in to comment.