[JBoss JIRA] (TEIID-5415) Simplify connection handling
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-5415:
-------------------------------------
Summary: Simplify connection handling
Key: TEIID-5415
URL: https://issues.jboss.org/browse/TEIID-5415
Project: Teiid
Issue Type: Quality Risk
Components: JDBC Driver
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 11.x
With the removal of TEIID-5411 we can further simplify our notion of connection handling. The current logic maintains a set of logins for known server instances under one logical connection. When a connection is returned to an XA pool (or the client issues special sql) the logical connection will select a new instance using a cached login if possible.
The benefits of the current approach are:
* works just from the hosts listed in the url
* works with XA connection pooling or connection pooling in general with additional setup to provide simple load balancing
The drawbacks are:
* creates a set of logins which may mostly sit idle
* is not load balancer aware - for example when just a load balanced end point is used. And the load balancing is just random, not intelligent.
* requires the client to keep a pool of physical connections
A proposal would be to keep multiple url failover, but removal all of the logic related to maintaining multiple logins under a logical connection.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (TEIID-5414) LISTAGG support
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5414?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5414:
---------------------------------------
Will evaluate in 11.x. TEIID-4833 added support for pushing down for a simple form of LISTAGG when using an oracle source, so this issue would cover full engine support.
> LISTAGG support
> ---------------
>
> Key: TEIID-5414
> URL: https://issues.jboss.org/browse/TEIID-5414
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Reporter: Lukáš Svačina
> Assignee: Steven Hawkins
> Fix For: 11.x
>
>
> It would be useful to have supported new SQL2016 syntax for *LISTAGG*. Currently TEIID suport only *STRING_AGG *keyword, so I have to regexp replace it in SQL syntax generated by JOOQ sql builder as it uses new *LISTAGG *keyword in default.
> Parameteres syntax should be the same in both so the easiest option is to add just alias into grammar. However LISTAGG supports also some advanced syntax which could be useful too.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (TEIID-5414) LISTAGG support
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5414?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5414:
----------------------------------
Component/s: Query Engine
Fix Version/s: 11.x
> LISTAGG support
> ---------------
>
> Key: TEIID-5414
> URL: https://issues.jboss.org/browse/TEIID-5414
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Reporter: Lukáš Svačina
> Assignee: Steven Hawkins
> Fix For: 11.x
>
>
> It would be useful to have supported new SQL2016 syntax for *LISTAGG*. Currently TEIID suport only *STRING_AGG *keyword, so I have to regexp replace it in SQL syntax generated by JOOQ sql builder as it uses new *LISTAGG *keyword in default.
> Parameteres syntax should be the same in both so the easiest option is to add just alias into grammar. However LISTAGG supports also some advanced syntax which could be useful too.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (TEIID-5414) LISTAGG support
by Lukáš Svačina (JIRA)
Lukáš Svačina created TEIID-5414:
------------------------------------
Summary: LISTAGG support
Key: TEIID-5414
URL: https://issues.jboss.org/browse/TEIID-5414
Project: Teiid
Issue Type: Feature Request
Reporter: Lukáš Svačina
Assignee: Steven Hawkins
It would be useful to have supported new SQL2016 syntax for *LISTAGG*. Currently TEIID suport only *STRING_AGG *keyword, so I have to regexp replace it in SQL syntax generated by JOOQ sql builder as it uses new *LISTAGG *keyword in default.
Parameteres syntax should be the same in both so the easiest option is to add just alias into grammar. However LISTAGG supports also some advanced syntax which could be useful too.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (TEIID-5413) Make inclusion of DDL schema optional in list-vdbs CLI method
by Ramesh Reddy (JIRA)
Ramesh Reddy created TEIID-5413:
-----------------------------------
Summary: Make inclusion of DDL schema optional in list-vdbs CLI method
Key: TEIID-5413
URL: https://issues.jboss.org/browse/TEIID-5413
Project: Teiid
Issue Type: Enhancement
Components: AdminApi, Server
Affects Versions: 11.0
Reporter: Ramesh Reddy
Assignee: Ramesh Reddy
Fix For: 11.1
By default the "list-vdbs" and "get-vdb" cli calls include the vdb payload with DDL metadata. It has been observed when the models are huge the web-console fails to work. Provide an option to not include the DDl in payload.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (TEIID-5397) RETURN_GENERATED_KEYS not working
by Lukáš Svačina (JIRA)
[ https://issues.jboss.org/browse/TEIID-5397?page=com.atlassian.jira.plugin... ]
Lukáš Svačina updated TEIID-5397:
---------------------------------
Issue Type: Feature Request (was: Bug)
> RETURN_GENERATED_KEYS not working
> ---------------------------------
>
> Key: TEIID-5397
> URL: https://issues.jboss.org/browse/TEIID-5397
> Project: Teiid
> Issue Type: Feature Request
> Affects Versions: 10.2.1
> Reporter: Lukáš Svačina
> Assignee: Steven Hawkins
>
> *+VDB:+*
> {code}
> <vdb name="_GENERATED_form_shoes" version="2">
> <model name="_INTERNAL_internalModel" type="PHYSICAL">
> <source name="internal_postgresql" translator-name="postgresql" connection-jndi-name="java:/internal"/>
> </model>
> <model name="GEN_view" type="VIRTUAL">
> <metadata type="DDL">
> <![CDATA[ CREATE VIEW "_view_workflow_data" OPTIONS (UPDATABLE 'true')
> AS SELECT "public"."form_shoes_2"."size" AS "size", "public"."form_shoes_2"."model" AS "model",
> "public"."form_shoes_2"."id" AS "id" FROM "public"."form_shoes_2" ]]>
> </metadata>
> </model>
> </vdb>
> {code}
> *+TABLE:+*
> name: form_shoes_2
> columns: id (SERIAL) | size (INTEGER *NULLABLE*) | model (VARCHAR *NULLABLE*)
> *+PROBLEM:+*
> Connected into VDB using JDBC like:
> {code:java}
> final PreparedStatement statement = c.prepareStatement(...INSERT..., Statement.RETURN_GENERATED_KEYS);
> statement.executeUpdate();
> final ResultSet generatedKeys = statement.getGeneratedKeys();
> {code}
> *generatedKeys is empty if:*
> # INSERT INTO "form_shoes_2" ( "model" ) VALUES ( 'adidas x1' ) ...... e.g. not all columns are enumerated ... if so, you can provide NULL values to optional columns and generated keys WORK!
> # INSERT INTO "_view_workflow_data" (id, name, size) VALUES (42, 'adidas x2', 12 ) ....... e.g. insering into view (1:1, no joins involved) even when all columns ARE enumerated ... probably no way how to get generated keys here?
> *+QUESTIONS:+*
> # How to get last_insert_id() when inserting into foreign table/views (with/without joins)?
> # How to get updated rows (UPDATE ... RETURNING *)? At least primary keys of affected rows?
> Thanks for fixing/adding this functionality.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months
[JBoss JIRA] (TEIID-5397) RETURN_GENERATED_KEYS not working
by Lukáš Svačina (JIRA)
[ https://issues.jboss.org/browse/TEIID-5397?page=com.atlassian.jira.plugin... ]
Lukáš Svačina commented on TEIID-5397:
--------------------------------------
Yes, it would be good way to go. I would also improve docs about "PRIMARY KEY (xx)" sql syntax within "CREATE VIEW" column specification. I think it is very uncommon and I did not find any information about it in docs.
> RETURN_GENERATED_KEYS not working
> ---------------------------------
>
> Key: TEIID-5397
> URL: https://issues.jboss.org/browse/TEIID-5397
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 10.2.1
> Reporter: Lukáš Svačina
> Assignee: Steven Hawkins
>
> *+VDB:+*
> {code}
> <vdb name="_GENERATED_form_shoes" version="2">
> <model name="_INTERNAL_internalModel" type="PHYSICAL">
> <source name="internal_postgresql" translator-name="postgresql" connection-jndi-name="java:/internal"/>
> </model>
> <model name="GEN_view" type="VIRTUAL">
> <metadata type="DDL">
> <![CDATA[ CREATE VIEW "_view_workflow_data" OPTIONS (UPDATABLE 'true')
> AS SELECT "public"."form_shoes_2"."size" AS "size", "public"."form_shoes_2"."model" AS "model",
> "public"."form_shoes_2"."id" AS "id" FROM "public"."form_shoes_2" ]]>
> </metadata>
> </model>
> </vdb>
> {code}
> *+TABLE:+*
> name: form_shoes_2
> columns: id (SERIAL) | size (INTEGER *NULLABLE*) | model (VARCHAR *NULLABLE*)
> *+PROBLEM:+*
> Connected into VDB using JDBC like:
> {code:java}
> final PreparedStatement statement = c.prepareStatement(...INSERT..., Statement.RETURN_GENERATED_KEYS);
> statement.executeUpdate();
> final ResultSet generatedKeys = statement.getGeneratedKeys();
> {code}
> *generatedKeys is empty if:*
> # INSERT INTO "form_shoes_2" ( "model" ) VALUES ( 'adidas x1' ) ...... e.g. not all columns are enumerated ... if so, you can provide NULL values to optional columns and generated keys WORK!
> # INSERT INTO "_view_workflow_data" (id, name, size) VALUES (42, 'adidas x2', 12 ) ....... e.g. insering into view (1:1, no joins involved) even when all columns ARE enumerated ... probably no way how to get generated keys here?
> *+QUESTIONS:+*
> # How to get last_insert_id() when inserting into foreign table/views (with/without joins)?
> # How to get updated rows (UPDATE ... RETURNING *)? At least primary keys of affected rows?
> Thanks for fixing/adding this functionality.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 5 months