Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

报错 #1

Open
wzxit opened this issue Aug 1, 2018 · 0 comments
Open

报错 #1

wzxit opened this issue Aug 1, 2018 · 0 comments

Comments

@wzxit
Copy link

wzxit commented Aug 1, 2018

我在where条件里填写根据时间来增量查询的where报错;
[pool-3-thread-2] ERROR com.github.stuxuhai.hdata.core.RecordEventExceptionHandler - null
at com.github.stuxuhai.hdata.plugin.writer.jdbc.JDBCWriter.prepareStatement(JDBCWriter.java:113)
at com.github.stuxuhai.hdata.plugin.writer.jdbc.JDBCWriter.prepare(JDBCWriter.java:88)
at com.github.stuxuhai.hdata.core.RecordWorkHandler.onEvent(RecordWorkHandler.java:29)
at com.github.stuxuhai.hdata.core.RecordWorkHandler.onEvent(RecordWorkHandler.java:9)
at com.lmax.disruptor.WorkProcessor.run(WorkProcessor.java:139)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLSyntaxErrorException: [Vertica]VJDBC ERROR: Syntax error at or near ")"
at com.vertica.util.ServerErrorData.buildException(Unknown Source)
at com.vertica.io.ProtocolStream.readExpectedMessage(Unknown Source)
at com.vertica.dataengine.VDataEngine.prepareImpl(Unknown Source)
at com.vertica.dataengine.VDataEngine.prepare(Unknown Source)
at com.vertica.dataengine.VDataEngine.prepare(Unknown Source)
at com.vertica.jdbc.common.SPreparedStatement.(Unknown Source)
at com.vertica.jdbc.jdbc4.S4PreparedStatement.(Unknown Source)
at com.vertica.jdbc.VerticaJdbc4PreparedStatementImpl.(Unknown Source)
at com.vertica.jdbc.VJDBCObjectFactory.createPreparedStatement(Unknown Source)
at com.vertica.jdbc.common.SConnection.prepareStatement(Unknown Source)
at com.github.stuxuhai.hdata.plugin.writer.jdbc.JDBCWriter.prepareStatement(JDBCWriter.java:111)
... 5 more
Caused by: com.vertica.support.exceptions.SyntaxErrorException: [Vertica]VJDBC ERROR: Syntax error at or near ")"
... 16 more

2018-08-01 13:03:52.913 [pool-3-thread-3] ERROR com.github.stuxuhai.hdata.core.RecordEventExceptionHandler - null
at com.github.stuxuhai.hdata.plugin.writer.jdbc.JDBCWriter.prepareStatement(JDBCWriter.java:113)
at com.github.stuxuhai.hdata.plugin.writer.jdbc.JDBCWriter.prepare(JDBCWriter.java:88)
at com.github.stuxuhai.hdata.core.RecordWorkHandler.onEvent(RecordWorkHandler.java:29)
at com.github.stuxuhai.hdata.core.RecordWorkHandler.onEvent(RecordWorkHandler.java:9)
at com.lmax.disruptor.WorkProcessor.run(WorkProcessor.java:139)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLSyntaxErrorException: [Vertica]VJDBC ERROR: Syntax error at or near ")"
at com.vertica.util.ServerErrorData.buildException(Unknown Source)
at com.vertica.io.ProtocolStream.readExpectedMessage(Unknown Source)
at com.vertica.dataengine.VDataEngine.prepareImpl(Unknown Source)
at com.vertica.dataengine.VDataEngine.prepare(Unknown Source)
at com.vertica.dataengine.VDataEngine.prepare(Unknown Source)
at com.vertica.jdbc.common.SPreparedStatement.(Unknown Source)
at com.vertica.jdbc.jdbc4.S4PreparedStatement.(Unknown Source)
at com.vertica.jdbc.VerticaJdbc4PreparedStatementImpl.(Unknown Source)
at com.vertica.jdbc.VJDBCObjectFactory.createPreparedStatement(Unknown Source)
at com.vertica.jdbc.common.SConnection.prepareStatement(Unknown Source)
at com.github.stuxuhai.hdata.plugin.writer.jdbc.JDBCWriter.prepareStatement(JDBCWriter.java:111)
大概是什么原因?

where写的是
(servicetype in ('装修','建材')) and (date('today') between servicedatestart and servicedateend)

直接查询没问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant