mirror of
https://github.com/lancedb/lancedb.git
synced 2026-05-24 23:40:39 +00:00
feat(nodejs): table.toArrow function (#1282)
Addresses https://github.com/lancedb/lancedb/issues/1254. --------- Co-authored-by: universalmind303 <cory.grinstead@gmail.com>
This commit is contained in:
@@ -11,8 +11,13 @@
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { Data, Schema, fromDataToBuffer, tableFromIPC } from "./arrow";
|
||||
import {
|
||||
Table as ArrowTable,
|
||||
Data,
|
||||
Schema,
|
||||
fromDataToBuffer,
|
||||
tableFromIPC,
|
||||
} from "./arrow";
|
||||
|
||||
import { getRegistry } from "./embedding/registry";
|
||||
import { IndexOptions } from "./indices";
|
||||
@@ -24,8 +29,8 @@ import {
|
||||
Table as _NativeTable,
|
||||
} from "./native";
|
||||
import { Query, VectorQuery } from "./query";
|
||||
|
||||
export { IndexConfig } from "./native";
|
||||
|
||||
/**
|
||||
* Options for adding data to a table.
|
||||
*/
|
||||
@@ -423,4 +428,9 @@ export class Table {
|
||||
async listIndices(): Promise<IndexConfig[]> {
|
||||
return await this.inner.listIndices();
|
||||
}
|
||||
|
||||
/** Return the table as an arrow table */
|
||||
async toArrow(): Promise<ArrowTable> {
|
||||
return await this.query().toArrow();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user