You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/08/02 19:08:00 UTC
[jira] [Commented] (SOLR-15570) JDBC table metadata should include
fields declared in the schema (not dynamic) even if they are empty in the
index
[ https://issues.apache.org/jira/browse/SOLR-15570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17391773#comment-17391773 ]
ASF subversion and git services commented on SOLR-15570:
--------------------------------------------------------
Commit 817e380bb428cbd45dda9587f8e029058c09a5a5 in lucene-solr's branch refs/heads/branch_8x from Timothy Potter
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=817e380 ]
SOLR-15570: Check stored or docValues when merging fields from the Luke schema response (#2544)
> JDBC table metadata should include fields declared in the schema (not dynamic) even if they are empty in the index
> ------------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-15570
> URL: https://issues.apache.org/jira/browse/SOLR-15570
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: Parallel SQL
> Reporter: Timothy Potter
> Assignee: Timothy Potter
> Priority: Minor
> Labels: RobustSQL
> Fix For: main (9.0), 8.10
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> Let's say I have field {{stringx}} declared in my schema but is empty (no docs in the index yet).
> Currently, the {{SolrSchema}} uses Luke to generate the table metadata and since {{stringx}} is empty, it's not included in the table metadata.
> {code}
> select id, stringx from collection
> {code}
> will fail with:
> {code}
> Error while executing SQL "SELECT id, stringx FROM collection1": From line 1, column 12 to line 1, column 18: Column 'stringx' not found in any table
> at org.apache.solr.client.solrj.io.stream.JDBCStream.open(JDBCStream.java:286)
> at org.apache.solr.client.solrj.io.stream.ExceptionStream.open(ExceptionStream.java:52)
> {code}
> Of course, if an application uses JDBC and {{describe table}} then they won't see {{stringx}} so no harm no foul. However, some apps / users may know that {{stringx}} is a field in the schema, leading to some mismatch in expectations and results.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org