ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Kuznetsov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-10874) JDBC thin driver metadata misses caches with queryEntities and names containing underscores
Date Wed, 09 Jan 2019 23:53:00 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-10874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16738822#comment-16738822
] 

Pavel Kuznetsov commented on IGNITE-10874:
------------------------------------------

This issue seems to be "brother" of odbc ticket IGNITE-10009

> JDBC thin driver metadata misses caches with queryEntities and names containing underscores
> -------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-10874
>                 URL: https://issues.apache.org/jira/browse/IGNITE-10874
>             Project: Ignite
>          Issue Type: Improvement
>          Components: jdbc
>    Affects Versions: 2.7
>            Reporter: Alexey Kukushkin
>            Priority: Major
>
> +*Steps to reproduce*+
> 1) Build and run this app: 
> {code:java}
> public class App {
>     public static void main(String[] ags) {
>         try (Ignite ignite = Ignition.start(
>             new IgniteConfiguration()
>                 .setDiscoverySpi(
>                     new TcpDiscoverySpi()
>                         .setIpFinder(
>                             new TcpDiscoveryVmIpFinder().setAddresses(Collections.singleton("127.0.0.1:47500"))
>                         )
>                 )
>         )) {
>             final String NAME = "V_MODELS_SHORT";
>             ignite.getOrCreateCache(
>                 new CacheConfiguration<>()
>                     .setName(NAME)
>                     .setCacheMode(CacheMode.PARTITIONED)
>                     .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)
>                     .setQueryEntities(Collections.singleton(
>                         new QueryEntity()
>                             .setKeyType(Integer.class.getTypeName())
>                             .setValueType(NAME)
>                             .setKeyFieldName("VMS_ID")
>                             .setFields(
>                                 Stream.of(
>                                     new AbstractMap.SimpleEntry<>("VMS_ID", Integer.class.getTypeName()),
>                                     new AbstractMap.SimpleEntry<>("VMS_HASVERSION",
Boolean.class.getTypeName())
>                                 ).collect(Collectors.toMap(
>                                     AbstractMap.SimpleEntry::getKey,
>                                     AbstractMap.SimpleEntry::getValue,
>                                     (u, v) -> {
>                                         throw new IllegalStateException(String.format("Duplicate
key %s", u));
>                                     },
>                                     LinkedHashMap::new
>                                 ))
>                             )
>                     ))
>             );
>             System.in.read();
>         }
>     }
> }
> {code}
> 2) While the app is running use a JDBC database management tool like DBeaver to open
a JDBC thin driver connection to Ignite.
> 3) Check table "V_MODELS_SHORT" under schema "V_MODELS_SHORT"
> +*Expected*+
> 3) Table "V_MODELS_SHORT" is visible under  schema "V_MODELS_SHORT"
> +*Actual*+
>  3) There is no table "V_MODELS_SHORT" under  schema "V_MODELS_SHORT"
> +*Notes*+
> You still can run queries on table V_MODELS_SHORT in DBeaver. For example, these queries
work fine:
> {code:java}
> INSERT INTO V_MODELS_SHORT.V_MODELS_SHORT VALUES (1, 'false');
> SELECT * FROM V_MODELS_SHORT.V_MODELS_SHORT;
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message