Skip to content

Commit

Permalink
Reenable batch for release (georgia-tech-db#1302)
Browse files Browse the repository at this point in the history
  • Loading branch information
xzdandy authored and a0x8o committed Nov 22, 2023
1 parent e19f144 commit e1c7336
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
14 changes: 14 additions & 0 deletions evadb/storage/native_storage_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,32 @@
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 2170a7a9 (Bump v0.3.4+ dev)
=======
>>>>>>> c5f43c65 (Bump v0.3.4+ dev)
=======
>>>>>>> fdd1c0e5 (Reenable batch for release (#1302))
from evadb.utils.generic_utils import PickleSerializer, rebatch
=======
from evadb.utils.generic_utils import PickleSerializer
>>>>>>> 40a10ce1 (Bump v0.3.4+ dev)
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
from evadb.utils.generic_utils import PickleSerializer, rebatch
>>>>>>> 3d009af6 (Reenable batch for release (#1302))
=======
>>>>>>> 2170a7a9 (Bump v0.3.4+ dev)
=======
>>>>>>> c5f43c65 (Bump v0.3.4+ dev)
=======
=======
from evadb.utils.generic_utils import PickleSerializer, rebatch
>>>>>>> 3d009af6 (Reenable batch for release (#1302))
>>>>>>> fdd1c0e5 (Reenable batch for release (#1302))
from evadb.utils.logging_manager import logger


Expand Down Expand Up @@ -424,6 +433,7 @@ def read(
_deserialize_sql_row(row, ordered_columns) for row in result
)

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
for data_batch in result:
Expand All @@ -445,6 +455,10 @@ def read(
=======
for data_batch in result:
yield Batch(pd.DataFrame([data_batch]))
=======
for df in rebatch(result, batch_mem_size):
yield Batch(pd.DataFrame(df))
>>>>>>> fdd1c0e5 (Reenable batch for release (#1302))

>>>>>>> 40a10ce1 (Bump v0.3.4+ dev)
<<<<<<< HEAD
Expand Down
17 changes: 17 additions & 0 deletions evadb/storage/sqlite_storage_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 2170a7a9 (Bump v0.3.4+ dev)
=======
Expand All @@ -44,6 +45,8 @@
>>>>>>> c5f43c65 (Bump v0.3.4+ dev)
=======
>>>>>>> ae08f806 (Bump v0.3.4+ dev)
=======
>>>>>>> fdd1c0e5 (Reenable batch for release (#1302))
from evadb.utils.generic_utils import PickleSerializer, rebatch
=======
from evadb.utils.generic_utils import PickleSerializer
Expand All @@ -58,6 +61,7 @@
=======
from evadb.utils.generic_utils import PickleSerializer, rebatch
>>>>>>> 3d009af6 (Reenable batch for release (#1302))
<<<<<<< HEAD
=======
>>>>>>> 2170a7a9 (Bump v0.3.4+ dev)
=======
Expand All @@ -72,6 +76,8 @@
from evadb.utils.generic_utils import PickleSerializer
>>>>>>> 6d6a14c8 (Bump v0.3.4+ dev)
>>>>>>> ae08f806 (Bump v0.3.4+ dev)
=======
>>>>>>> fdd1c0e5 (Reenable batch for release (#1302))
from evadb.utils.logging_manager import logger

# Leveraging Dynamic schema in SQLAlchemy
Expand Down Expand Up @@ -238,6 +244,7 @@ def read(
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 3d009af6 (Reenable batch for release (#1302))
=======
Expand All @@ -248,6 +255,10 @@ def read(
>>>>>>> c5f43c65 (Bump v0.3.4+ dev)
=======
>>>>>>> ae08f806 (Bump v0.3.4+ dev)
=======
=======
>>>>>>> 3d009af6 (Reenable batch for release (#1302))
>>>>>>> fdd1c0e5 (Reenable batch for release (#1302))
result_iter = (
self._deserialize_sql_row(row._asdict(), table.columns)
for row in result
Expand All @@ -257,6 +268,9 @@ def read(
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> fdd1c0e5 (Reenable batch for release (#1302))
=======
=======
>>>>>>> 6d6a14c8 (Bump v0.3.4+ dev)
Expand Down Expand Up @@ -288,6 +302,7 @@ def read(
>>>>>>> 6d6a14c8 (Bump v0.3.4+ dev)
=======
>>>>>>> 3d009af6 (Reenable batch for release (#1302))
<<<<<<< HEAD
=======
>>>>>>> 40a10ce1 (Bump v0.3.4+ dev)
>>>>>>> 2170a7a9 (Bump v0.3.4+ dev)
Expand All @@ -304,6 +319,8 @@ def read(
=======
>>>>>>> 6d6a14c8 (Bump v0.3.4+ dev)
>>>>>>> ae08f806 (Bump v0.3.4+ dev)
=======
>>>>>>> fdd1c0e5 (Reenable batch for release (#1302))
except Exception as e:
err_msg = f"Failed to read the table {table.name} with exception {str(e)}"
logger.exception(err_msg)
Expand Down

0 comments on commit e1c7336

Please sign in to comment.