[JBoss JIRA] (TEIID-4318) Add option to define or determine ProtoField 1-to-x relationships
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4318?page=com.atlassian.jira.plugin... ]
Van Halbert updated TEIID-4318:
-------------------------------
Issue Type: Enhancement (was: Feature Request)
> Add option to define or determine ProtoField 1-to-x relationships
> -----------------------------------------------------------------
>
> Key: TEIID-4318
> URL: https://issues.jboss.org/browse/TEIID-4318
> Project: Teiid
> Issue Type: Enhancement
> Components: Misc. Connectors
> Affects Versions: 9.x
> Reporter: Van Halbert
> Assignee: Van Halbert
>
> Now that the infinispan hotrod translator/connector support the use of Java Protobuf Annotations for defining the metadata and configuring the cache, now the logic needs to be able to determine the 1-to-n relationships that can be defined from the parent object.
> Example: a Person can have 0 to many phone numbers
> The following is how to define with annotation:
> {code}
> Person {
> ...
> @ProtoField(number = 4, collectionImplementation = ArrayList.class)
> public List<PhoneNumber> phones;
> ...
> }
> {code}
> The connector will need to be able to make this determination so that it can register PhoneNumber when configuring the cache. Example:
> {code}
> String protoSchema = protoSchemaBuilder
> .fileName(protoName)
> .addClass(Person.class)
> .addClass(PhoneNumber.class)
> .build(ctx);
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4318) Add option to define or determine ProtoField 1-to-x relationships
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4318?page=com.atlassian.jira.plugin... ]
Van Halbert reassigned TEIID-4318:
----------------------------------
Assignee: Van Halbert (was: Steven Hawkins)
> Add option to define or determine ProtoField 1-to-x relationships
> -----------------------------------------------------------------
>
> Key: TEIID-4318
> URL: https://issues.jboss.org/browse/TEIID-4318
> Project: Teiid
> Issue Type: Feature Request
> Components: Misc. Connectors
> Affects Versions: 9.x
> Reporter: Van Halbert
> Assignee: Van Halbert
>
> Now that the infinispan hotrod translator/connector support the use of Java Protobuf Annotations for defining the metadata and configuring the cache, now the logic needs to be able to determine the 1-to-n relationships that can be defined from the parent object.
> Example: a Person can have 0 to many phone numbers
> The following is how to define with annotation:
> {code}
> Person {
> ...
> @ProtoField(number = 4, collectionImplementation = ArrayList.class)
> public List<PhoneNumber> phones;
> ...
> }
> {code}
> The connector will need to be able to make this determination so that it can register PhoneNumber when configuring the cache. Example:
> {code}
> String protoSchema = protoSchemaBuilder
> .fileName(protoName)
> .addClass(Person.class)
> .addClass(PhoneNumber.class)
> .build(ctx);
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4318) Add option to define or determine ProtoField 1-to-x relationships
by Van Halbert (JIRA)
Van Halbert created TEIID-4318:
----------------------------------
Summary: Add option to define or determine ProtoField 1-to-x relationships
Key: TEIID-4318
URL: https://issues.jboss.org/browse/TEIID-4318
Project: Teiid
Issue Type: Feature Request
Components: Misc. Connectors
Affects Versions: 9.x
Reporter: Van Halbert
Assignee: Steven Hawkins
Now that the infinispan hotrod translator/connector support the use of Java Protobuf Annotations for defining the metadata and configuring the cache, now the logic needs to be able to determine the 1-to-n relationships that can be defined from the parent object.
Example: a Person can have 0 to many phone numbers
The following is how to define with annotation:
{code}
Person {
...
@ProtoField(number = 4, collectionImplementation = ArrayList.class)
public List<PhoneNumber> phones;
...
}
{code}
The connector will need to be able to make this determination so that it can register PhoneNumber when configuring the cache. Example:
{code}
String protoSchema = protoSchemaBuilder
.fileName(protoName)
.addClass(Person.class)
.addClass(PhoneNumber.class)
.build(ctx);
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4269) numeric calculated fields not displayed with odata4
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4269?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4269:
-------------------------------------
A expression in Teiid yields
{code}
convert(convert(539568, double)/106, bigdecimal(13,3))
{code}
5090.264150943396
so here if the data is being computed, IMO "convert" is not converting the result to 5090.264 to match what is defined or if view is defined with column as bigdecimal (13,3) computed value is not being implicitly converted to defined scale.
I am not sure what is the solution?
> numeric calculated fields not displayed with odata4
> ---------------------------------------------------
>
> Key: TEIID-4269
> URL: https://issues.jboss.org/browse/TEIID-4269
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.13.3
> Reporter: Mirco Marchitiello
> Assignee: Ramesh Reddy
> Priority: Minor
>
> I've created a virtual table with a new field defined in this way:
> select ROUND((BA.PREIS / BA.PEINH), 3) AS UnitPrice from xxxxxx
> for the source field are bigdecimal I define UnitPrice as
> BigDecimal (13,3)
> If I run the qery from JDBC
> select * from PurchaseRequisitionEntity where PurchaseRequisitionKey = '300-8000001452-00010' ;
> PREIS = 539,568
> PEINH = 106
> UnitPrice = 5,090.264
> And the result is correct. If I run from odata2
> /odata/CASALE.1/Entities.PurchaseRequisitionEntity('300-8000001452-00010')?$format=json
> "UnitPrice" : "5090.2640000000000000"
> As you can see the field is rounded to the 3rd digit but 13 more digits are returned with 0 value.
> Anyway odata2 succeeds in returning the result without errors.
> With odata4 I get an error:
> /odata4/CASALE.1/Entities/PurchaseRequisitionEntity('300-8000001452-00010')?$format=json
> {"error":{"code":null,"message":"The value '5090.2640000000000000' is not valid for property 'UnitPrice'."}}
> I think that's because the length of the field is greater then the matedata definition.
> At the moment the only solution I can imagine is to convert the number to a string in the proper format and the parse it into a number
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4316) Accumulo translator: null values not returned for <> criteria in WHERE clause
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4316?page=com.atlassian.jira.plugin... ]
Ramesh Reddy edited comment on TEIID-4316 at 7/5/16 2:25 PM:
-------------------------------------------------------------
{code}
SELECT nullable_column FROM table_name WHERE nullable_column <> some_value
{code}
the "nullable_column" in where clause is different column than one in select ?
I tried same with postgres, I see the behavior as acceptable
{code}
test=# select * from customers;
id | name
----+-----------
1 | customer1
2 | customer2
3 | customer3
4 | customer4
5 |
(5 rows)
test=# select * from customers where name <> 'customer2'
test-# ;
id | name
----+-----------
1 | customer1
3 | customer3
4 | customer4
(3 rows)
{code}
was (Author: rareddy):
{code}
SELECT nullable_column FROM table_name WHERE nullable_column <> some_value
{code}
the "nullable_column" in where clause is different column than one in select ?
> Accumulo translator: null values not returned for <> criteria in WHERE clause
> -----------------------------------------------------------------------------
>
> Key: TEIID-4316
> URL: https://issues.jboss.org/browse/TEIID-4316
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.5
> Reporter: Jan Stastny
> Assignee: Ramesh Reddy
>
> For columns, which contain some null values, a query like:
> {code:sql}
> SELECT nullable_column FROM table_name WHERE nullable_column <> some_value
> {code}
> doesn't return null values.
> Simple select works:
> {code:sql}
> SELECT nullable_column FROM table_name
> {code}
> returns all rows regardless whether they are null or not.
> IS NULL criteria in WHERE clause also work:
> {code:sql}
> SELECT nullable_column FROM table_name WHERE nullable_column IS NULL
> {code}
> returns correct number of null values.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4316) Accumulo translator: null values not returned for <> criteria in WHERE clause
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4316?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4316:
-------------------------------------
{code}
SELECT nullable_column FROM table_name WHERE nullable_column <> some_value
{code}
the "nullable_column" in where clause is different column than one in select ?
> Accumulo translator: null values not returned for <> criteria in WHERE clause
> -----------------------------------------------------------------------------
>
> Key: TEIID-4316
> URL: https://issues.jboss.org/browse/TEIID-4316
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.5
> Reporter: Jan Stastny
> Assignee: Ramesh Reddy
>
> For columns, which contain some null values, a query like:
> {code:sql}
> SELECT nullable_column FROM table_name WHERE nullable_column <> some_value
> {code}
> doesn't return null values.
> Simple select works:
> {code:sql}
> SELECT nullable_column FROM table_name
> {code}
> returns all rows regardless whether they are null or not.
> IS NULL criteria in WHERE clause also work:
> {code:sql}
> SELECT nullable_column FROM table_name WHERE nullable_column IS NULL
> {code}
> returns correct number of null values.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4311) Teiid Admin Api not support to create XA datasource on Jboss server.
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4311?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4311:
-------------------------------------
[~kylin] Use the first example you showed.
{code}
batch
/subsystem=datasources/xa-data-source=mysqlXADS:add(jndi-name="${db.jndi_name}", driver-name=mysqlXA, user-name="${db.user}", password="${db.password}", use-java-context=true)
/subsystem=datasources/xa-data-source=mysqlXADS/xa-datasource-properties=DatabaseName:add(value="${db.database_name}")
/subsystem=datasources/xa-data-source=mysqlXADS/xa-datasource-properties=PortNumber:add(value="${db.port}")
/subsystem=datasources/xa-data-source=mysqlXADS/xa-datasource-properties=ServerName:add(value="${db.host}")
run-batch
{code}
it is not just 5 lines, there could be more depending upon the properties provided "connection-properties" property. If this looks too confusing please assign JIRA back to me.
> Teiid Admin Api not support to create XA datasource on Jboss server.
> --------------------------------------------------------------------
>
> Key: TEIID-4311
> URL: https://issues.jboss.org/browse/TEIID-4311
> Project: Teiid
> Issue Type: Bug
> Components: AdminApi
> Affects Versions: 8.13.x
> Reporter: Prakash Jape
> Assignee: Kylin Soong
> Fix For: 9.1, 9.0.2
>
>
> Teiid Admin api does not support or does not have capability to create XA datasource on Jboss server.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4277) Infinispan Cache DSL translator: materialization incomplete results during view's loading
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4277?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4277:
------------------------------------
Determined that the issue is happening after a server restart.
> Infinispan Cache DSL translator: materialization incomplete results during view's loading
> -----------------------------------------------------------------------------------------
>
> Key: TEIID-4277
> URL: https://issues.jboss.org/browse/TEIID-4277
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.5
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Blocker
> Attachments: test.log
>
>
> When user tries to query materialized view in a moment when its loading is in progress, incomplete results are returned. The status of the view in corresponding status table is LOADING.
> Vdb used:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <vdb name="jdg-remote" version="1">
> <description>For testing of materialized views</description>
> <property name ="lib" value ="org.jboss.qe.jdg.pojos"></property>
> <model name="jdgSource">
> <source name="jdgSource" translator-name="jdg-override"
> connection-jndi-name="java:/jdg-mat-ds" />
> <metadata type="DDL"><![CDATA[
> CREATE FOREIGN TABLE CustomerReport(
> customerId integer not null OPTIONS (SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
> totalAmount integer,
> CONSTRAINT PK_ID PRIMARY KEY(customerId)
> ) OPTIONS (NAMEINSOURCE '${db.table.prefix}jdg-mat', UPDATABLE TRUE);]]>
> </metadata>
> </model>
> <model name="h2Source">
> <source name="h2Source" translator-name="h2" connection-jndi-name="java:/h2-ds" />
> </model>
> <model name="View" type="VIRTUAL">
> <metadata type="DDL"><![CDATA[
> CREATE VIEW external_long_ttl (
> customerId integer NOT NULL,
> totalAmount integer
> ) OPTIONS (MATERIALIZED 'TRUE',
> MATERIALIZED_TABLE 'jdgSource.CustomerReport',
> "teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
> "teiid_rel:MATVIEW_LOAD_SCRIPT" 'INSERT INTO jdgSource.CustomerReport(customerId,totalAmount) SELECT c.id AS customerId, CONVERT(SUM(o.amount),integer) AS totalAmount FROM DV_MATVIEWS_CUSTOMERS c INNER JOIN DV_MATVIEWS_ORDERS o ON c.id = o.customer_id GROUP BY c.id;',
> "teiid_rel:MATVIEW_STATUS_TABLE" 'h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE',
> "teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute jdgSource.native(''truncate cache'');',
> "teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'execute jdgSource.native(''swap cache names'');',
> "teiid_rel:MATVIEW_ONERROR_ACTION" 'WAIT',
> "teiid_rel:MATVIEW_TTL" 10000
> )
> AS SELECT c.id AS customerId, CONVERT(SUM(o.amount),integer) AS totalAmount FROM DV_MATVIEWS_CUSTOMERS c INNER JOIN DV_MATVIEWS_ORDERS o ON c.id = o.customer_id GROUP BY c.id;
> ]]>
> </metadata>
> </model>
> <translator name="jdg-override" type="infinispan-cache-dsl">
> <property name="SupportsDirectQueryProcedure" value="true" />
> </translator>
> </vdb>
> {code}
> Resource-adapter used:
> {code:xml}
> <resource-adapter id="jdg-mat">
> <module slot="main" id="org.jboss.teiid.resource-adapter.infinispan.dsl"/>
> <connection-definitions>
> <connection-definition class-name="org.teiid.resource.adapter.infinispan.dsl.InfinispanManagedConnectionFactory" jndi-name="java:/jdg-mat-ds" enabled="true" pool-name="jdg-mat">
> <config-property name="ProtobufDefinitionFile">
> /org/jboss/qe/jdg/remote/protobuf/CustomerReport.proto
> </config-property>
> <config-property name="AliasCacheName">
> ${db.table.prefix}jdg-alias
> </config-property>
> <config-property name="MessageMarshallers">
> org.jboss.qe.jdg.pojo.CustomerReport:org.jboss.qe.jdg.remote.marshaller.CustomerReportMarshaller
> </config-property>
> <config-property name="RemoteServerList">
> [remote-server-address]:11322
> </config-property>
> <config-property name="StagingCacheName">
> ${db.table.prefix}jdg-mat-stage
> </config-property>
> <config-property name="CacheTypeMap">
> ${db.table.prefix}jdg-mat:org.jboss.qe.jdg.pojo.CustomerReport;customerId
> </config-property>
> <config-property name="MessageDescriptor">
> org.jboss.qe.jdg.remote.protobuf.CustomerReport
> </config-property>
> <config-property name="Module">
> org.jboss.qe.jdg.pojos
> </config-property>
> </connection-definition>
> </connection-definitions>
> </resource-adapter>
> {code}
> Datasource used (tables that the view queries):
> {code:xml}
> <xa-datasource jndi-name="java:/h2-ds" pool-name="h2-xa-ds" enabled="true">
> <xa-datasource-property name="URL">
> jdbc:h2:tcp://localhost:9292/db;TRACE_LEVEL_FILE=4
> </xa-datasource-property>
> <driver>h2</driver>
> <security>
> <user-name>sa</user-name>
> </security>
> </xa-datasource>
> {code}
> Query invoked to check current contents of materialized view:
> {code:sql}
> SELECT COUNT(*) FROM external_long_ttl;
> {code}
> And expected result is the same as count of DV_MATVIEWS_CUSTOMERS table from source h2Source. In my case 10.
> But when I print out the result I get all numbers from 0 to 10 . See attached log output (search for 'check-count:')
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months