-
Notifications
You must be signed in to change notification settings - Fork 21.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address no implicit conversion of Arel::Attributes::Attribute into String
#37646
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Thanks for the review. What do you think about restoring the original code like |
Yeah, it is fine to me. |
…tring` rails@4a9ef5e triggers this failure, then restored the original code for `activerecord/lib/arel/visitors/oracle.rb` . ``` $ bundle exec rspec ./spec/active_record/connection_adapters/oracle_enhanced/context_index_spec.rb:92 ==> Loading config from ENV or use default ==> Running specs with MRI version 2.6.5 ==> Effective ActiveRecord version 6.1.0.alpha ... snip ... Run options: include {:locations=>{"./spec/active_record/connection_adapters/oracle_enhanced/context_index_spec.rb"=>[92]}} F Failures: 1) OracleEnhancedAdapter context index on single table should create single VARCHAR2 column index Failure/Error: expect(Post.contains(:title, word).to_a).to eq([@POST2, @post1]) TypeError: no implicit conversion of Arel::Attributes::Attribute into String # /home/yahonda/git/rails/activerecord/lib/arel/visitors/oracle.rb:107:in `match?' # /home/yahonda/git/rails/activerecord/lib/arel/visitors/oracle.rb:107:in `block (2 levels) in order_hacks' # /home/yahonda/git/rails/activerecord/lib/arel/visitors/oracle.rb:106:in `any?' # /home/yahonda/git/rails/activerecord/lib/arel/visitors/oracle.rb:106:in `block in order_hacks' # /home/yahonda/git/rails/activerecord/lib/arel/visitors/oracle.rb:105:in `any?' # /home/yahonda/git/rails/activerecord/lib/arel/visitors/oracle.rb:105:in `order_hacks' # /home/yahonda/git/rails/activerecord/lib/arel/visitors/oracle.rb:8:in `visit_Arel_Nodes_SelectStatement' # /home/yahonda/git/rails/activerecord/lib/arel/visitors/visitor.rb:30:in `visit' # /home/yahonda/git/rails/activerecord/lib/arel/visitors/visitor.rb:11:in `accept' # /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/determine_if_preparable_visitor.rb:10:in `accept' # /home/yahonda/git/rails/activerecord/lib/arel/visitors/to_sql.rb:18:in `compile' # /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:25:in `to_sql_and_binds' # /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:63:in `select_all' # /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:107:in `select_all' # /home/yahonda/git/rails/activerecord/lib/active_record/querying.rb:46:in `find_by_sql' # /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:826:in `block in exec_queries' # /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:844:in `skip_query_cache_if_necessary' # /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:811:in `exec_queries' # /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:629:in `load' # /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:250:in `records' # /home/yahonda/git/rails/activerecord/lib/active_record/relation.rb:245:in `to_ary' # ./spec/active_record/connection_adapters/oracle_enhanced/context_index_spec.rb:95:in `block (4 levels) in <top (required)>' ... snip ... ```
yahonda
force-pushed
the
diag_oracle_enhanced_1943
branch
from
November 6, 2019 07:51
cbf21bb
to
eb6c857
Compare
kamipo
added a commit
to kamipo/rails
that referenced
this pull request
Apr 15, 2020
This removes ibm_db, informix, mssql, oracle, and oracle12 Arel visitors which are not used in the code base. Actually oracle and oracle12 visitors are used at oracle-enhanced adapter, but now I think that those visitors should be in the adapter's repo like sqlserver adapter and the dedicated Arel visitor (https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/master/lib/arel/visitors/sqlserver.rb), otherwise it is hard to find a bug and review PRs for the oracle visitors (e.g. rails#35838, rails#37646), since we don't have knowledge and environment enough for Oracle.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This pull request addresses the following
TypeError: no implicit conversion of Arel::Attributes::Attribute into String
error reported by rsim/oracle-enhanced#19434a9ef5e triggers this failure.