[JBoss JIRA] (TEIID-3497) INSERT statement with Object value fails - Unsupported Types value: 2, 000 [postgres]
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3497?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3497.
-----------------------------------
Resolution: Duplicate Issue
Duplicate of TEIID-3340
> INSERT statement with Object value fails - Unsupported Types value: 2,000 [postgres]
> ------------------------------------------------------------------------------------
>
> Key: TEIID-3497
> URL: https://issues.jboss.org/browse/TEIID-3497
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: OS: Fedora 20
> arch: x86_64
> java: oracle 1.8
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
>
> The INSERT query with Object value fails with the root exception:
> Caused by: org.postgresql.util.PSQLException: Unsupported Types value: 2,000
> at org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1858)
> ...
> Insert query [1], source specific command [2], postgres table [3], teiid vdb[4].
> [1] INSERT INTO smalla VALUES (55,'0',NULL,'-24',-24.00,-24,-24.0,-128,{d'2000-01-01'},{t'00:00:00'},{ts'2000-01-01 00:00:00.0'},0,'1',-32768,-24,-24,'-24')
> [2] INSERT INTO smalla (IntKey, StringKey, IntNum, StringNum, FloatNum, LongNum, DoubleNum, ByteNum, DateValue, TimeValue, TimestampValue, BooleanValue, CharValue, ShortValue, BigIntegerValue, BigDecimalValue, ObjectValue) VALUES (55, '0', NULL, '-24', -24.0, -24, -24.0, -128, DATE '2000-01-01', TIME '00:00:00', TIMESTAMP '2000-01-01 00:00:00.0', FALSE, '1', -32768, -24, -24, ?)
> [3]
> create table SmallA (StringNum varchar(15),
> IntNum integer,
> DoubleNum double precision,
> StringKey varchar(15),
> BigDecimalValue numeric(15,5),
> IntKey integer,
> ByteNum smallint,
> DateValue date,
> TimeValue time,
> TimestampValue timestamp,
> BooleanValue boolean,
> CharValue char(1),
> ShortValue smallint,
> FloatNum real,
> LongNum bigint,
> BigIntegerValue numeric(15,0),
> ObjectValue text);
> [4]
> <vdb name="vdb-tmp" version="1">
> <model name="Source">
> <source name="local" translator-name="postgresql" connection-jndi-name="java:/localPostgreSQL"/>
> <metadata type="DDL"><![CDATA[
> CREATE FOREIGN TABLE smalla(IntKey integer, StringKey string, IntNum integer, StringNum string, FloatNum float, LongNum long, DoubleNum double, ByteNum byte, DateValue date, TimeValue time, TimestampValue timestamp, BooleanValue boolean, CharValue char, ShortValue short, BigIntegerValue biginteger, BigDecimalValue bigdecimal, ObjectValue object) OPTIONS (UPDATABLE 'TRUE');
> ]]>
> </metadata>
> </model>
> </vdb>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 7 months
[JBoss JIRA] (TEIID-3497) INSERT statement with Object value fails - Unsupported Types value: 2, 000 [postgres]
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-3497?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-3497:
-------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1226323
> INSERT statement with Object value fails - Unsupported Types value: 2,000 [postgres]
> ------------------------------------------------------------------------------------
>
> Key: TEIID-3497
> URL: https://issues.jboss.org/browse/TEIID-3497
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: OS: Fedora 20
> arch: x86_64
> java: oracle 1.8
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
>
> The INSERT query with Object value fails with the root exception:
> Caused by: org.postgresql.util.PSQLException: Unsupported Types value: 2,000
> at org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1858)
> ...
> Insert query [1], source specific command [2], postgres table [3], teiid vdb[4].
> [1] INSERT INTO smalla VALUES (55,'0',NULL,'-24',-24.00,-24,-24.0,-128,{d'2000-01-01'},{t'00:00:00'},{ts'2000-01-01 00:00:00.0'},0,'1',-32768,-24,-24,'-24')
> [2] INSERT INTO smalla (IntKey, StringKey, IntNum, StringNum, FloatNum, LongNum, DoubleNum, ByteNum, DateValue, TimeValue, TimestampValue, BooleanValue, CharValue, ShortValue, BigIntegerValue, BigDecimalValue, ObjectValue) VALUES (55, '0', NULL, '-24', -24.0, -24, -24.0, -128, DATE '2000-01-01', TIME '00:00:00', TIMESTAMP '2000-01-01 00:00:00.0', FALSE, '1', -32768, -24, -24, ?)
> [3]
> create table SmallA (StringNum varchar(15),
> IntNum integer,
> DoubleNum double precision,
> StringKey varchar(15),
> BigDecimalValue numeric(15,5),
> IntKey integer,
> ByteNum smallint,
> DateValue date,
> TimeValue time,
> TimestampValue timestamp,
> BooleanValue boolean,
> CharValue char(1),
> ShortValue smallint,
> FloatNum real,
> LongNum bigint,
> BigIntegerValue numeric(15,0),
> ObjectValue text);
> [4]
> <vdb name="vdb-tmp" version="1">
> <model name="Source">
> <source name="local" translator-name="postgresql" connection-jndi-name="java:/localPostgreSQL"/>
> <metadata type="DDL"><![CDATA[
> CREATE FOREIGN TABLE smalla(IntKey integer, StringKey string, IntNum integer, StringNum string, FloatNum float, LongNum long, DoubleNum double, ByteNum byte, DateValue date, TimeValue time, TimestampValue timestamp, BooleanValue boolean, CharValue char, ShortValue short, BigIntegerValue biginteger, BigDecimalValue bigdecimal, ObjectValue object) OPTIONS (UPDATABLE 'TRUE');
> ]]>
> </metadata>
> </model>
> </vdb>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 7 months
[JBoss JIRA] (TEIID-3497) INSERT statement with Object value fails - Unsupported Types value: 2, 000 [postgres]
by Juraj Duráni (JIRA)
Juraj Duráni created TEIID-3497:
-----------------------------------
Summary: INSERT statement with Object value fails - Unsupported Types value: 2,000 [postgres]
Key: TEIID-3497
URL: https://issues.jboss.org/browse/TEIID-3497
Project: Teiid
Issue Type: Bug
Affects Versions: 8.7.1.6_2
Environment: OS: Fedora 20
arch: x86_64
java: oracle 1.8
Reporter: Juraj Duráni
Assignee: Steven Hawkins
The INSERT query with Object value fails with the root exception:
Caused by: org.postgresql.util.PSQLException: Unsupported Types value: 2,000
at org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1858)
...
Insert query [1], source specific command [2], postgres table [3], teiid vdb[4].
[1] INSERT INTO smalla VALUES (55,'0',NULL,'-24',-24.00,-24,-24.0,-128,{d'2000-01-01'},{t'00:00:00'},{ts'2000-01-01 00:00:00.0'},0,'1',-32768,-24,-24,'-24')
[2] INSERT INTO smalla (IntKey, StringKey, IntNum, StringNum, FloatNum, LongNum, DoubleNum, ByteNum, DateValue, TimeValue, TimestampValue, BooleanValue, CharValue, ShortValue, BigIntegerValue, BigDecimalValue, ObjectValue) VALUES (55, '0', NULL, '-24', -24.0, -24, -24.0, -128, DATE '2000-01-01', TIME '00:00:00', TIMESTAMP '2000-01-01 00:00:00.0', FALSE, '1', -32768, -24, -24, ?)
[3]
create table SmallA (StringNum varchar(15),
IntNum integer,
DoubleNum double precision,
StringKey varchar(15),
BigDecimalValue numeric(15,5),
IntKey integer,
ByteNum smallint,
DateValue date,
TimeValue time,
TimestampValue timestamp,
BooleanValue boolean,
CharValue char(1),
ShortValue smallint,
FloatNum real,
LongNum bigint,
BigIntegerValue numeric(15,0),
ObjectValue text);
[4]
<vdb name="vdb-tmp" version="1">
<model name="Source">
<source name="local" translator-name="postgresql" connection-jndi-name="java:/localPostgreSQL"/>
<metadata type="DDL"><![CDATA[
CREATE FOREIGN TABLE smalla(IntKey integer, StringKey string, IntNum integer, StringNum string, FloatNum float, LongNum long, DoubleNum double, ByteNum byte, DateValue date, TimeValue time, TimestampValue timestamp, BooleanValue boolean, CharValue char, ShortValue short, BigIntegerValue biginteger, BigDecimalValue bigdecimal, ObjectValue object) OPTIONS (UPDATABLE 'TRUE');
]]>
</metadata>
</model>
</vdb>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 7 months
[JBoss JIRA] (TEIID-3496) update status table in ON_VDB_DROP_SCRIPT should point to correct name and schemaname
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-3496?page=com.atlassian.jira.plugin... ]
Kylin Soong reassigned TEIID-3496:
----------------------------------
Assignee: Kylin Soong
> update status table in ON_VDB_DROP_SCRIPT should point to correct name and schemaname
> -------------------------------------------------------------------------------------
>
> Key: TEIID-3496
> URL: https://issues.jboss.org/browse/TEIID-3496
> Project: Teiid
> Issue Type: Bug
> Components: Quick Starts
> Reporter: Kylin Soong
> Assignee: Kylin Soong
>
> This may be caused by miss spelling , in "teiid_rel:ON_VDB_DROP_SCRIPT" section, the name and schemaname should point to stockPricesMatView and StocksMatModel, but current looks
> ~~~
> <model name="StocksMatModel" type="VIRTUAL">
> <metadata type="DDL"><![CDATA[
> CREATE view stockPricesMatView
> ...
> ) OPTIONS(
> ...
> "teiid_rel:ON_VDB_DROP_SCRIPT" 'DELETE FROM Accounts.status WHERE Name=''stock'' AND schemaname = ''Stocks''',
> ~~~
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 7 months
[JBoss JIRA] (TEIID-3496) update status table in ON_VDB_DROP_SCRIPT should point to correct name and schemaname
by Kylin Soong (JIRA)
Kylin Soong created TEIID-3496:
----------------------------------
Summary: update status table in ON_VDB_DROP_SCRIPT should point to correct name and schemaname
Key: TEIID-3496
URL: https://issues.jboss.org/browse/TEIID-3496
Project: Teiid
Issue Type: Bug
Components: Quick Starts
Reporter: Kylin Soong
This may be caused by miss spelling , in "teiid_rel:ON_VDB_DROP_SCRIPT" section, the name and schemaname should point to stockPricesMatView and StocksMatModel, but current looks
~~~
<model name="StocksMatModel" type="VIRTUAL">
<metadata type="DDL"><![CDATA[
CREATE view stockPricesMatView
...
) OPTIONS(
...
"teiid_rel:ON_VDB_DROP_SCRIPT" 'DELETE FROM Accounts.status WHERE Name=''stock'' AND schemaname = ''Stocks''',
~~~
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 7 months
[JBoss JIRA] (TEIID-3491) Add support for REGEXP_REPLACE
by Tom Arnold (JIRA)
[ https://issues.jboss.org/browse/TEIID-3491?page=com.atlassian.jira.plugin... ]
Tom Arnold edited comment on TEIID-3491 at 5/28/15 11:14 PM:
-------------------------------------------------------------
Sent pull request. Implemented using Java's Pattern class, so anything valid for that can be used. One difference from most other implementations is that back-references in the replacement string are written like {{$1}} instead of {{\1}}.
http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
I implemented another variant which allows several flags to be set that modify how the match is performed. The supported flags are:
* {{i}} - case insensitive match
* {{g}} - global match (aka replace-all)
* {{m}} - multiline match; changes {{^}} and {{$}} to match line-beginning and line-end instead of source-beginning and source-end.
I did not attempt to implement any pushdown support for this but I can look into it if there is interest.
Edit: I forgot to mention that I added a cache for the compiled regex patterns similar to what was done for the number and date formats. The Pattern object is threadsafe. The cache key is the combination of the regex string and the flags used to compile the pattern.
was (Author: tom9729):
Sent pull request. Implemented using Java's Pattern class, so anything valid for that can be used. One difference from most other implementations is that back-references in the replacement string are written like {{$1}} instead of {{\1}}.
http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
I implemented another variant which allows several flags to be set that modify how the match is performed. The supported flags are:
* {{i}} - case insensitive match
* {{g}} - global match (aka replace-all)
* {{m}} - multiline match; changes {{^}} and {{$}} to match line-beginning and line-end instead of source-beginning and source-end.
I did not attempt to implement any pushdown support for this but I can look into it if there is interest.
> Add support for REGEXP_REPLACE
> ------------------------------
>
> Key: TEIID-3491
> URL: https://issues.jboss.org/browse/TEIID-3491
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Reporter: Tom Arnold
> Assignee: Steven Hawkins
>
> Add support for REGEXP_REPLACE function like in Postgres.
> http://www.postgresql.org/docs/9.3/static/functions-string.html
> Pushdown version might be tricky.
> * MySQL - No support.
> * Postgres - Good.
> * Oracle - Good, but "g" flag to replace all matches is set by positional params instead.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 7 months
[JBoss JIRA] (TEIID-3491) Add support for REGEXP_REPLACE
by Tom Arnold (JIRA)
[ https://issues.jboss.org/browse/TEIID-3491?page=com.atlassian.jira.plugin... ]
Tom Arnold commented on TEIID-3491:
-----------------------------------
Sent pull request. Implemented using Java's Pattern class, so anything valid for that can be used. One difference from most other implementations is that back-references in the replacement string are written like {{$1}} instead of {{\1}}.
http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
I implemented another variant which allows several flags to be set that modify how the match is performed. The supported flags are:
* {{i}} - case insensitive match
* {{g}} - global match (aka replace-all)
* {{m}} - multiline match; changes {{^}} and {{$}} to match line-beginning and line-end instead of source-beginning and source-end.
I did not attempt to implement any pushdown support for this but I can look into it if there is interest.
> Add support for REGEXP_REPLACE
> ------------------------------
>
> Key: TEIID-3491
> URL: https://issues.jboss.org/browse/TEIID-3491
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Reporter: Tom Arnold
> Assignee: Steven Hawkins
>
> Add support for REGEXP_REPLACE function like in Postgres.
> http://www.postgresql.org/docs/9.3/static/functions-string.html
> Pushdown version might be tricky.
> * MySQL - No support.
> * Postgres - Good.
> * Oracle - Good, but "g" flag to replace all matches is set by positional params instead.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 7 months
[JBoss JIRA] (TEIID-3495) add ROUND() as supported function for DB@
by Johnathon Lee (JIRA)
Johnathon Lee created TEIID-3495:
------------------------------------
Summary: add ROUND() as supported function for DB@
Key: TEIID-3495
URL: https://issues.jboss.org/browse/TEIID-3495
Project: Teiid
Issue Type: Feature Request
Components: JDBC Connector
Affects Versions: 8.7
Reporter: Johnathon Lee
Assignee: Steven Hawkins
DB2 translator can be updated to reflect the ROUND() function available on DB2
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 7 months