Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Chia committed May 1, 2024
1 parent 60da15f commit 9aac19f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/daft-scan/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,9 @@ impl ScanTask {
config.csv_inflation_factor
}
#[cfg(feature = "python")]
FileFormatConfig::Database(_) => 0.0,
FileFormatConfig::Database(_) => 1.0,
#[cfg(feature = "python")]
FileFormatConfig::PythonFunction => 0.0,
FileFormatConfig::PythonFunction => 1.0,
};

// estimate number of rows from read schema
Expand Down
7 changes: 7 additions & 0 deletions tests/io/lancedb/test_lancedb_reads.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,10 @@ def test_lancedb_read_filter(lance_dataset_path):
df = df.where(df["lat"] > 45)
df = df.select("vector")
assert df.to_pydict() == {"vector": data["vector"][:1]}


def test_lancedb_read_limit(lance_dataset_path):
df = daft.read_lance(lance_dataset_path)
df = df.limit(1)
df = df.select("vector")
assert df.to_pydict() == {"vector": data["vector"][:1]}

0 comments on commit 9aac19f

Please sign in to comment.