@@ -633,7 +633,6 @@ export function getSchema(source) {
633633// function to do table operations on in-memory data?
634634export function __table ( source , operations ) {
635635 const input = source ;
636- let { columns} = source ;
637636 let { schema, inferred} = getSchema ( source ) ;
638637 // Combine column types from schema with user-selected types in operations
639638 const types = new Map ( schema . map ( ( { name, type} ) => [ name , type ] ) ) ;
@@ -756,9 +755,6 @@ export function __table(source, operations) {
756755 const schemaByName = new Map ( schema . map ( ( s ) => [ s . name , s ] ) ) ;
757756 schema = operations . select . columns . map ( ( c ) => schemaByName . get ( c ) ) ;
758757 }
759- if ( columns ) {
760- columns = operations . select . columns ;
761- }
762758 source = source . map ( ( d ) =>
763759 Object . fromEntries ( operations . select . columns . map ( ( c ) => [ c , d [ c ] ] ) )
764760 ) ;
@@ -771,12 +767,6 @@ export function __table(source, operations) {
771767 return ( { ...s , ...( override ? { name : override . name } : null ) } ) ;
772768 } ) ;
773769 }
774- if ( columns ) {
775- columns = columns . map ( ( c ) => {
776- const override = overridesByName . get ( c ) ;
777- return override ?. name ?? c ;
778- } ) ;
779- }
780770 source = source . map ( ( d ) =>
781771 Object . fromEntries ( Object . keys ( d ) . map ( ( k ) => {
782772 const override = overridesByName . get ( k ) ;
@@ -786,7 +776,6 @@ export function __table(source, operations) {
786776 }
787777 if ( source !== input ) {
788778 if ( schema ) source . schema = schema ;
789- if ( columns ) source . columns = columns ;
790779 }
791780 return source ;
792781}
0 commit comments