diff --git a/sql-odbc/src/IntegrationTests/ITODBCInfo/test_odbc_info.cpp b/sql-odbc/src/IntegrationTests/ITODBCInfo/test_odbc_info.cpp index 4f2e43b8cf..0e8808e4d9 100644 --- a/sql-odbc/src/IntegrationTests/ITODBCInfo/test_odbc_info.cpp +++ b/sql-odbc/src/IntegrationTests/ITODBCInfo/test_odbc_info.cpp @@ -180,7 +180,7 @@ TEST_SQL_GET_INFO_VERSION_GE(SQLDBMSVer, SQL_DBMS_VER, L"7.1.1"); TEST_SQL_GET_INFO_STRING(SQLColumnAlias, SQL_COLUMN_ALIAS, L"Y"); TEST_SQL_GET_INFO_UINT16(SQLGroupBy, SQL_GROUP_BY, - SQL_GB_GROUP_BY_EQUALS_SELECT); + SQL_GB_GROUP_BY_CONTAINS_SELECT); TEST_SQL_GET_INFO_STRING(SQLIdentifierQuoteChar, SQL_IDENTIFIER_QUOTE_CHAR, L"`"); TEST_SQL_GET_INFO_UINT_MASK(SQLOJCapabilities, SQL_OJ_CAPABILITIES, diff --git a/sql-odbc/src/PowerBIConnector/OdfeSqlOdbcPBIConnector.pq b/sql-odbc/src/PowerBIConnector/OdfeSqlOdbcPBIConnector.pq index f1af5f74b6..fa706a5db9 100644 --- a/sql-odbc/src/PowerBIConnector/OdfeSqlOdbcPBIConnector.pq +++ b/sql-odbc/src/PowerBIConnector/OdfeSqlOdbcPBIConnector.pq @@ -78,6 +78,10 @@ OdfeSqlOdbcPBIConnectorImpl = (Host as text, optional Port as number) as table = Driver = "ODFE SQL ODBC Driver" ], + SQLGetInfo = Diagnostics.LogValue("SQLGetInfo_Options", [ + SQL_AGGREGATE_FUNCTIONS = ODBC[SQL_AF][All] + ]), + SQLGetTypeInfo = (types) => if (EnableTraceOutput <> true) then types else let @@ -102,26 +106,6 @@ OdfeSqlOdbcPBIConnectorImpl = (Host as text, optional Port as number) as table = Value.ReplaceType(toTable, Value.Type(source)) else source, - - // Add support for `LIMIT` and `OFFSET` clauses (rather than `TOP`) - AstVisitor = [ - // format is "LIMIT [,]" - ex. LIMIT 2,10 or LIMIT 10 - LimitClause = (skip, take) => - if (take = null) then - ... - else - let - skip = - if (skip = null or skip = 0) then - "" - else - Number.ToText(skip) & "," - in - [ - Text = Text.Format("LIMIT #{0}#{1}", { skip, take }), - Location = "AfterQuerySpecification" - ] - ], OdbcDatasource = Odbc.DataSource(ConnectionString & Server & CredentialConnectionString & EncryptedConnectionString, [ // Do not view the tables grouped by their schema names. @@ -136,9 +120,9 @@ OdfeSqlOdbcPBIConnectorImpl = (Host as text, optional Port as number) as table = ClientConnectionPooling = true, // These values should be set by previous steps - AstVisitor = AstVisitor, SQLColumns = SQLColumns, SQLGetTypeInfo = SQLGetTypeInfo, + SQLGetInfo = SQLGetInfo, OnError = OnOdbcError, diff --git a/sql-odbc/src/PowerBIConnector/bin/Release/OdfeSqlOdbcPBIConnector.mez b/sql-odbc/src/PowerBIConnector/bin/Release/OdfeSqlOdbcPBIConnector.mez index dc5ae9d8ab..a45e425fbf 100644 Binary files a/sql-odbc/src/PowerBIConnector/bin/Release/OdfeSqlOdbcPBIConnector.mez and b/sql-odbc/src/PowerBIConnector/bin/Release/OdfeSqlOdbcPBIConnector.mez differ diff --git a/sql-odbc/src/odfesqlodbc/info.c b/sql-odbc/src/odfesqlodbc/info.c index a8925d4087..45e1bad0e3 100644 --- a/sql-odbc/src/odfesqlodbc/info.c +++ b/sql-odbc/src/odfesqlodbc/info.c @@ -245,7 +245,7 @@ RETCODE SQL_API ESAPI_GetInfo(HDBC hdbc, SQLUSMALLINT fInfoType, case SQL_GROUP_BY: /* ODBC 2.0 */ len = 2; - value = SQL_GB_GROUP_BY_EQUALS_SELECT; + value = SQL_GB_GROUP_BY_CONTAINS_SELECT; break; case SQL_IDENTIFIER_CASE: /* ODBC 1.0 */