You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/01/06 00:06:01 UTC

[GitHub] [nifi] readl1 removed a comment on pull request #2231: NIFI-4521 MS SQL CDC Processor

readl1 removed a comment on pull request #2231:
URL: https://github.com/apache/nifi/pull/2231#issuecomment-753328778


   I believe Decimal is 10^38 not 2^38
   
   On Thu, Dec 31, 2020 at 4:50 PM Peter Wicks <no...@github.com>
   wrote:
   
   > *@patricker* commented on this pull request.
   > ------------------------------
   >
   > In
   > nifi-nar-bundles/nifi-cdc/nifi-cdc-mssql-bundle/nifi-cdc-mssql-processors/src/main/java/org/apache/nifi/cdc/mssql/MSSQLCDCUtils.java
   > <https://github.com/apache/nifi/pull/2231#discussion_r550695992>:
   >
   > > +        sbQuery.append(_columnSplit);
   > +        sbQuery.append(getCURRENT_TIMESTAMP() + " EXTRACT_TIME");
   > +        sbQuery.append("\n");
   > +        sbQuery.append("FROM " + tableInfo.getSourceSchemaName() + ".\""+ tableInfo.getSourceTableName() + "\"");
   > +
   > +        return sbQuery.toString();
   > +    }
   > +
   > +    public String getCDCSelectStatement(MSSQLTableInfo tableInfo, boolean includePreupdateValues, Timestamp maxTime){
   > +        final StringBuilder sbQuery = new StringBuilder();
   > +
   > +        sbQuery.append("SELECT t.tran_begin_time\n" +
   > +                ",t.tran_end_time \"tran_end_time\"\n" +
   > +                ",CAST(t.tran_id AS bigint) trans_id\n" +
   > +                ",CAST(\"o\".\"__$start_lsn\" AS bigint) start_lsn\n" +
   > +                ",CAST(\"o\".\"__$seqval\" AS bigint) seqval\n" +
   >
   > I was just researching this. BIGINT is actually bigger than decimal in MS
   > SQL....? It looks like BIGINT actually holds up to 2^63 (-1), where as
   > DECIMAL(38) only holds up to 2^38 (-1). So... unless I'm missing something
   > I don't see a reason to move to DECIMAL. In fact, based on research, I
   > think BIGINT might be the best fit.
   >
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/nifi/pull/2231#discussion_r550695992>, or
   > unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/ACHJPBOTFGVWHQ4YVV576ITSXTWYPANCNFSM4EBDBPRA>
   > .
   >
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org