Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions bigframes/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def _compile_unordered(self) -> compiled.UnorderedIR:
def shape(self) -> typing.Tuple[int, int]:
"""Returns dimensions as (length, width) tuple."""
width = len(self._compile().columns)
count_expr = self._compile()._to_ibis_expr(ordering_mode="unordered").count()
count_expr = self._compile_unordered()._to_ibis_expr().count()

# Support in-memory engines for hermetic unit tests.
if not self.node.session:
Expand Down Expand Up @@ -161,13 +161,10 @@ def start_query(

def cached(self, cluster_cols: typing.Sequence[str]) -> ArrayValue:
"""Write the ArrayValue to a session table and create a new block object that references it."""
compiled = self._compile()
ibis_expr = compiled._to_ibis_expr(
compiled_value = self._compile()
ibis_expr = compiled_value._to_ibis_expr(
ordering_mode="unordered", expose_hidden_cols=True
)
destination = self.session._ibis_to_session_table(
ibis_expr, cluster_cols=cluster_cols, api_name="cache"
)
tmp_table = self.session._ibis_to_session_table(
ibis_expr, cluster_cols=cluster_cols, api_name="cached"
)
Expand Down
8 changes: 5 additions & 3 deletions bigframes/core/compile/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from bigframes.core.compile.compiled import CompiledArrayValue
from bigframes.core.compile.compiler import compile_ordered
from bigframes.core.compile.compiled import OrderedIR, UnorderedIR
from bigframes.core.compile.compiler import compile_ordered, compile_unordered

__all__ = [
"compile_ordered",
"CompiledArrayValue",
"compile_unordered",
"OrderedIR",
"UnorderedIR",
]
Loading