Coder Social home page Coder Social logo

Comments (7)

ankuriitk avatar ankuriitk commented on August 20, 2024

Its happening to us too!

from pghero.

ankuriitk avatar ankuriitk commented on August 20, 2024

NoMethodError: undefined method []' for nil:NilClass pghero/methods/suggested_indexes.rb:121:inblock (2 levels) in best_index_helper'
columns = (where + sort).map { |c| c[:column] }.uniq
pghero/methods/suggested_indexes.rb:121:in map' columns = (where + sort).map { |c| c[:column] }.uniq pghero/methods/suggested_indexes.rb:121:inblock in best_index_helper'
columns = (where + sort).map { |c| c[:column] }.uniq
pghero/methods/suggested_indexes.rb:103:in each' parts.each do |statement, structure| pghero/methods/suggested_indexes.rb:103:inbest_index_helper'
parts.each do |statement, structure|
...
(104 additional frame(s) were not displayed)

from pghero.

kebling avatar kebling commented on August 20, 2024

I am also experiencing this issue.

from pghero.

ankane avatar ankane commented on August 20, 2024

I'm having trouble reproducing without the specific query it's trying to parse, but I found a potential cause. Try master to see if it fixes the error.

from pghero.

kebling avatar kebling commented on August 20, 2024

Still having the same error. The last query executed is below, which returns results when I run it manually:

SELECT schemaname AS schema, tablename AS table, attname AS column, null_frac, n_distinct FROM pg_stats WHERE tablename IN (NULL, 'list', 'of', 'some', 'table', 'names') AND schemaname = 'public' ORDER BY 1, 2, 3

from pghero.

ankane avatar ankane commented on August 20, 2024

Try the debug_suggested_indexes branch. It'll output the statement it's trying to parse.

from pghero.

kebling avatar kebling commented on August 20, 2024

Actually, your 2nd attempt fixed it, and I didn't realize you committed it until I checked out the debug_suggested_indexes branch. Everything is working properly on my end now. Thanks so much!

from pghero.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.