question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature: Ability to Drop columns

See original GitHub issue

Use case: Removing columns that aren’t needed any more or to allow removal of columns that were accidentally added.

New columns could be added very easily, typos for example:

UPDATE mytable SET someMispelledColumn = ?

Feature description: Allow us to drop columns using the ALTER command, so for example:

ALTER TABLE mytable DROP COLUMN mycolumn;

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:17
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
celauscommented, Oct 10, 2022

Hi @bputt - thanks! We already have that in our backlog, I’ll add your upvote to it 👍

2reactions
mfusseneggercommented, Oct 10, 2022

From a developer’s perspective, both array _ count(#882) and drop column(#4457) are the most important and relatively easy to implement features

If you think those are easy to implement, we’re happy to accept contributions and can also give you some pointers how to do that if you’re interested.

A slow version of array_count would indeed be rather simple. All one had to do is to implement a new scalar function. Taking a look at one of the PRs that added other scalar functions should be a good starting point. The reason we didn’t add it already, other than lack of time, is that a common use case for it is to query for all records where “an array is not empty” or “an array has more than 1 element”. Implementing array_count as a simple scalar function would lead in a slow query execution and we’d need to introduce an option for an optimized query generation for this common use-case. Otherwise we wouldn’t meet the expectations most people likely have. This makes this “not easy”.

Drop column is even worse once you ask yourself questions like “what to do with the already indexed data” and “what to do if a column with the same name but different type is added later on”. Possible answers to these questions are not easy.

On a more general note. We see that this is often requested and agree that it’s useful and important functionality. We just didn’t get around to do it properly yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to drop one or multiple columns in Pandas Dataframe
Method 2: Drop Columns from a Dataframe using iloc[] and drop() method. ... Remove all columns between a specific column to another column....
Read more >
Pandas drop column : Different methods
Purpose: To drop the specified rows or columns from the DataFrame. Parameters: labels: single label or list (default: None). Used to specify the ......
Read more >
R : Keep / Drop Columns from Data Frame - ListenData
The most easiest way to drop columns is by using subset() function. In the code below, we are telling R to drop variables...
Read more >
How to Drop Columns in Pandas Tutorial - DataCamp
The columns can be removed by specifying label names and corresponding axis, or by specifying index or column names directly. When using a...
Read more >
Drop columns with NA in Pandas DataFrame - PYnative
Drop columns with NA values from pandas DataFrame. It covers all the cases to remove columns that contain missing values.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found