[ 
https://issues.apache.org/jira/browse/SPARK-57778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SPARK-57778:
-----------------------------------
    Labels: pull-request-available  (was: )

> JDBC: Oracle catalog fails on objects that exist but are not selectable as 
> tables (synonyms to procedures/functions, invalid views)
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-57778
>                 URL: https://issues.apache.org/jira/browse/SPARK-57778
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core, SQL
>    Affects Versions: 4.0.3
>            Reporter: Ivan Leventsov
>            Priority: Major
>              Labels: pull-request-available
>
> When using the built-in JDBC {{TableCatalog}} over Oracle, the driver's table 
> listing returns objects that cannot be read as tables, for example a synonym 
> that resolves to a PL/SQL procedure/function/package, or an invalid view.
> Probing such an object ({{{}tableExists{}}} via {{{}SELECT 1 FROM <obj> WHERE 
> 1=0{}}}, or schema resolution via {{{}SELECT * FROM <obj> WHERE 1=0{}}}) 
> raises {{ORA-04044}} ("procedure, function, package, or type is not allowed 
> here") or {{ORA-04063}} ("... has errors").
> These are currently unclassified, so {{tableExists}} throws instead of 
> returning {{{}false{}}}, and table resolution surfaces a raw {{FAILED_JDBC}} 
> error.
> Proposed: add a {{JdbcDialect.isNotSelectableObjectException}} predicate 
> (Oracle recognizes {{{}ORA-04044{}}}/{{{}ORA-04063{}}}) so {{tableExists}} 
> returns {{false}} for such objects and schema resolution throws a clear, 
> dedicated error ({{{}JDBC_OBJECT_NOT_SELECTABLE{}}}) instead of a generic 
> failure.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to