@databricks/sql 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/README.md +2 -2
  2. package/dist/DBSQLClient.d.ts +9 -9
  3. package/dist/DBSQLClient.js +94 -63
  4. package/dist/DBSQLClient.js.map +1 -1
  5. package/dist/DBSQLOperation/CompleteOperationHelper.d.ts +3 -3
  6. package/dist/DBSQLOperation/CompleteOperationHelper.js +12 -17
  7. package/dist/DBSQLOperation/CompleteOperationHelper.js.map +1 -1
  8. package/dist/DBSQLOperation/FetchResultsHelper.d.ts +4 -5
  9. package/dist/DBSQLOperation/FetchResultsHelper.js +16 -12
  10. package/dist/DBSQLOperation/FetchResultsHelper.js.map +1 -1
  11. package/dist/DBSQLOperation/OperationStatusHelper.d.ts +2 -3
  12. package/dist/DBSQLOperation/OperationStatusHelper.js +12 -12
  13. package/dist/DBSQLOperation/OperationStatusHelper.js.map +1 -1
  14. package/dist/DBSQLOperation/SchemaHelper.d.ts +2 -3
  15. package/dist/DBSQLOperation/SchemaHelper.js +2 -3
  16. package/dist/DBSQLOperation/SchemaHelper.js.map +1 -1
  17. package/dist/DBSQLOperation/index.d.ts +7 -7
  18. package/dist/DBSQLOperation/index.js +18 -11
  19. package/dist/DBSQLOperation/index.js.map +1 -1
  20. package/dist/DBSQLSession.d.ts +3 -5
  21. package/dist/DBSQLSession.js +63 -49
  22. package/dist/DBSQLSession.js.map +1 -1
  23. package/dist/connection/auth/DatabricksOAuth/AuthorizationCode.d.ts +24 -0
  24. package/dist/connection/auth/DatabricksOAuth/AuthorizationCode.js +165 -0
  25. package/dist/connection/auth/DatabricksOAuth/AuthorizationCode.js.map +1 -0
  26. package/dist/connection/auth/DatabricksOAuth/OAuthManager.d.ts +47 -0
  27. package/dist/connection/auth/DatabricksOAuth/OAuthManager.js +169 -0
  28. package/dist/connection/auth/DatabricksOAuth/OAuthManager.js.map +1 -0
  29. package/dist/connection/auth/DatabricksOAuth/OAuthPersistence.d.ts +10 -0
  30. package/dist/connection/auth/DatabricksOAuth/OAuthPersistence.js +29 -0
  31. package/dist/connection/auth/DatabricksOAuth/OAuthPersistence.js.map +1 -0
  32. package/dist/connection/auth/DatabricksOAuth/OAuthScope.d.ts +7 -0
  33. package/dist/connection/auth/DatabricksOAuth/OAuthScope.js +11 -0
  34. package/dist/connection/auth/DatabricksOAuth/OAuthScope.js.map +1 -0
  35. package/dist/connection/auth/DatabricksOAuth/OAuthToken.d.ts +10 -0
  36. package/dist/connection/auth/DatabricksOAuth/OAuthToken.js +32 -0
  37. package/dist/connection/auth/DatabricksOAuth/OAuthToken.js.map +1 -0
  38. package/dist/connection/auth/DatabricksOAuth/index.d.ts +21 -0
  39. package/dist/connection/auth/DatabricksOAuth/index.js +41 -0
  40. package/dist/connection/auth/DatabricksOAuth/index.js.map +1 -0
  41. package/dist/connection/auth/PlainHttpAuthentication.d.ts +11 -11
  42. package/dist/connection/auth/PlainHttpAuthentication.js +15 -7
  43. package/dist/connection/auth/PlainHttpAuthentication.js.map +1 -1
  44. package/dist/connection/connections/HttpConnection.d.ts +1 -2
  45. package/dist/connection/connections/HttpConnection.js +24 -14
  46. package/dist/connection/connections/HttpConnection.js.map +1 -1
  47. package/dist/connection/contracts/IAuthentication.d.ts +2 -2
  48. package/dist/connection/contracts/IConnectionOptions.d.ts +3 -1
  49. package/dist/connection/contracts/IConnectionProvider.d.ts +1 -2
  50. package/dist/contracts/IDBSQLClient.d.ts +17 -3
  51. package/dist/dto/Status.d.ts +9 -13
  52. package/dist/dto/Status.js +31 -10
  53. package/dist/dto/Status.js.map +1 -1
  54. package/dist/globalConfig.d.ts +5 -0
  55. package/dist/globalConfig.js +5 -0
  56. package/dist/globalConfig.js.map +1 -1
  57. package/dist/hive/Commands/BaseCommand.d.ts +3 -1
  58. package/dist/hive/Commands/BaseCommand.js +66 -4
  59. package/dist/hive/Commands/BaseCommand.js.map +1 -1
  60. package/dist/hive/HiveDriver.d.ts +3 -2
  61. package/dist/hive/HiveDriver.js +116 -44
  62. package/dist/hive/HiveDriver.js.map +1 -1
  63. package/dist/index.d.ts +0 -2
  64. package/dist/index.js +0 -2
  65. package/dist/index.js.map +1 -1
  66. package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/http_connection.js +10 -0
  67. package/dist/result/ArrowResult.js +3 -0
  68. package/dist/result/ArrowResult.js.map +1 -1
  69. package/dist/result/JsonResult.js +3 -0
  70. package/dist/result/JsonResult.js.map +1 -1
  71. package/dist/utils/areHeadersEqual.d.ts +2 -0
  72. package/dist/utils/areHeadersEqual.js +49 -0
  73. package/dist/utils/areHeadersEqual.js.map +1 -0
  74. package/dist/utils/index.d.ts +2 -1
  75. package/dist/utils/index.js +3 -1
  76. package/dist/utils/index.js.map +1 -1
  77. package/dist/version.d.ts +1 -1
  78. package/dist/version.js +1 -1
  79. package/package.json +6 -6
  80. package/thrift/TCLIService.d.ts +17 -0
  81. package/thrift/TCLIService_types.d.ts +185 -13
  82. package/thrift/TCLIService_types.js +2013 -279
  83. package/dist/connection/auth/NoSaslAuthentication.d.ts +0 -5
  84. package/dist/connection/auth/NoSaslAuthentication.js +0 -15
  85. package/dist/connection/auth/NoSaslAuthentication.js.map +0 -1
  86. package/dist/connection/auth/helpers/SaslPackageFactory.d.ts +0 -11
  87. package/dist/connection/auth/helpers/SaslPackageFactory.js +0 -20
  88. package/dist/connection/auth/helpers/SaslPackageFactory.js.map +0 -1
  89. package/dist/connection/contracts/ITransport.d.ts +0 -13
  90. package/dist/connection/contracts/ITransport.js +0 -3
  91. package/dist/connection/contracts/ITransport.js.map +0 -1
  92. package/dist/connection/transports/HttpTransport.d.ts +0 -14
  93. package/dist/connection/transports/HttpTransport.js +0 -24
  94. package/dist/connection/transports/HttpTransport.js.map +0 -1
  95. package/dist/connection/types/AuthOptions.d.ts +0 -4
  96. package/dist/connection/types/AuthOptions.js +0 -3
  97. package/dist/connection/types/AuthOptions.js.map +0 -1
  98. package/dist/factory/StatusFactory.d.ts +0 -12
  99. package/dist/factory/StatusFactory.js +0 -35
  100. package/dist/factory/StatusFactory.js.map +0 -1
  101. package/node_modules/async-limiter/.eslintignore +0 -2
  102. package/node_modules/async-limiter/.nycrc +0 -10
  103. package/node_modules/async-limiter/.travis.yml +0 -9
  104. package/node_modules/async-limiter/LICENSE +0 -8
  105. package/node_modules/async-limiter/index.js +0 -67
  106. package/node_modules/async-limiter/package.json +0 -35
  107. package/node_modules/async-limiter/readme.md +0 -132
  108. package/node_modules/browser-or-node/LICENSE +0 -21
  109. package/node_modules/browser-or-node/README.md +0 -63
  110. package/node_modules/browser-or-node/lib/index.js +0 -31
  111. package/node_modules/browser-or-node/package.json +0 -60
  112. package/node_modules/browser-or-node/src/index.js +0 -26
  113. package/node_modules/isomorphic-ws/LICENSE +0 -21
  114. package/node_modules/isomorphic-ws/README.md +0 -58
  115. package/node_modules/isomorphic-ws/browser.js +0 -17
  116. package/node_modules/isomorphic-ws/index.d.ts +0 -8
  117. package/node_modules/isomorphic-ws/node.js +0 -3
  118. package/node_modules/isomorphic-ws/package.json +0 -34
  119. package/node_modules/node-int64/.npmignore +0 -3
  120. package/node_modules/node-int64/Int64.js +0 -268
  121. package/node_modules/node-int64/LICENSE +0 -19
  122. package/node_modules/node-int64/README.md +0 -78
  123. package/node_modules/node-int64/package.json +0 -27
  124. package/node_modules/node-int64/test.js +0 -120
  125. package/node_modules/q/CHANGES.md +0 -800
  126. package/node_modules/q/LICENSE +0 -18
  127. package/node_modules/q/README.md +0 -874
  128. package/node_modules/q/package.json +0 -76
  129. package/node_modules/q/q.js +0 -2076
  130. package/node_modules/q/queue.js +0 -35
  131. package/node_modules/ws/LICENSE +0 -21
  132. package/node_modules/ws/README.md +0 -417
  133. package/node_modules/ws/index.js +0 -9
  134. package/node_modules/ws/lib/buffer-util.js +0 -72
  135. package/node_modules/ws/lib/constants.js +0 -10
  136. package/node_modules/ws/lib/event-target.js +0 -170
  137. package/node_modules/ws/lib/extension.js +0 -211
  138. package/node_modules/ws/lib/permessage-deflate.js +0 -516
  139. package/node_modules/ws/lib/receiver.js +0 -513
  140. package/node_modules/ws/lib/sender.js +0 -401
  141. package/node_modules/ws/lib/validation.js +0 -29
  142. package/node_modules/ws/lib/websocket-server.js +0 -369
  143. package/node_modules/ws/lib/websocket.js +0 -828
  144. package/node_modules/ws/package.json +0 -44
  145. /package/{node_modules → dist/node_modules}/thrift/LICENSE +0 -0
  146. /package/{node_modules → dist/node_modules}/thrift/README.md +0 -0
  147. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/README.md +0 -0
  148. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/binary.js +0 -0
  149. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/binary_protocol.js +0 -0
  150. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/browser.js +0 -0
  151. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/buffered_transport.js +0 -0
  152. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/compact_protocol.js +0 -0
  153. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/connection.js +0 -0
  154. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/create_client.js +0 -0
  155. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/framed_transport.js +0 -0
  156. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/header_protocol.js +0 -0
  157. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/header_transport.js +0 -0
  158. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/index.js +0 -0
  159. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/input_buffer_underrun_error.js +0 -0
  160. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/int64_util.js +0 -0
  161. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/json_parse.js +0 -0
  162. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/json_protocol.js +0 -0
  163. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/log.js +0 -0
  164. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/multiplexed_processor.js +0 -0
  165. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/multiplexed_protocol.js +0 -0
  166. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/protocol.js +0 -0
  167. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/server.js +0 -0
  168. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/thrift.js +0 -0
  169. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/transport.js +0 -0
  170. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/web_server.js +0 -0
  171. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/ws_connection.js +0 -0
  172. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/ws_transport.js +0 -0
  173. /package/{node_modules → dist/node_modules}/thrift/lib/nodejs/lib/thrift/xhr_connection.js +0 -0
  174. /package/{node_modules → dist/node_modules}/thrift/package.json +0 -0
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function areArraysEqual(a, b) {
4
+ // If they're the same object - they're equal
5
+ if (a === b) {
6
+ return true;
7
+ }
8
+ // If they have a different size - they're definitely not equal
9
+ if (a.length !== b.length) {
10
+ return false;
11
+ }
12
+ // Here we have arrays of same size. Compare elements - if any pair is different
13
+ // then arrays are different
14
+ for (let i = 0; i < a.length; i += 1) {
15
+ if (a[i] !== b[i]) {
16
+ return false;
17
+ }
18
+ }
19
+ // If all corresponding elements in both arrays are equal - arrays are equal too
20
+ return true;
21
+ }
22
+ function areHeadersEqual(a, b) {
23
+ // If they're the same object - they're equal
24
+ if (a === b) {
25
+ return true;
26
+ }
27
+ // If both objects have different keys - they're not equal
28
+ const keysOfA = Object.keys(a);
29
+ const keysOfB = Object.keys(b);
30
+ if (!areArraysEqual(keysOfA, keysOfB)) {
31
+ return false;
32
+ }
33
+ // Compare corresponding properties of both objects. If any pair is different - objects are different
34
+ for (const key of keysOfA) {
35
+ const propA = a[key];
36
+ const propB = b[key];
37
+ if (Array.isArray(propA) && Array.isArray(propB)) {
38
+ if (!areArraysEqual(propA, propB)) {
39
+ return false;
40
+ }
41
+ }
42
+ else if (propA !== propB) {
43
+ return false;
44
+ }
45
+ }
46
+ return true;
47
+ }
48
+ exports.default = areHeadersEqual;
49
+ //# sourceMappingURL=areHeadersEqual.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"areHeadersEqual.js","sourceRoot":"","sources":["../../lib/utils/areHeadersEqual.ts"],"names":[],"mappings":";;AAEA,SAAS,cAAc,CAAI,CAAW,EAAE,CAAW;IACjD,6CAA6C;IAC7C,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IAED,+DAA+D;IAC/D,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE;QACzB,OAAO,KAAK,CAAC;KACd;IAED,gFAAgF;IAChF,4BAA4B;IAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;QACpC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;YACjB,OAAO,KAAK,CAAC;SACd;KACF;IAED,gFAAgF;IAChF,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAwB,eAAe,CAAC,CAAc,EAAE,CAAc;IACpE,6CAA6C;IAC7C,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IAED,0DAA0D;IAC1D,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/B,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/B,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE;QACrC,OAAO,KAAK,CAAC;KACd;IAED,qGAAqG;IACrG,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;QACzB,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACrB,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QAErB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YAChD,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;gBACjC,OAAO,KAAK,CAAC;aACd;SACF;aAAM,IAAI,KAAK,KAAK,KAAK,EAAE;YAC1B,OAAO,KAAK,CAAC;SACd;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AA5BD,kCA4BC"}
@@ -1,4 +1,5 @@
1
+ import areHeadersEqual from './areHeadersEqual';
1
2
  import definedOrError from './definedOrError';
2
3
  import buildUserAgentString from './buildUserAgentString';
3
4
  import formatProgress, { ProgressUpdateTransformer } from './formatProgress';
4
- export { definedOrError, buildUserAgentString, formatProgress, ProgressUpdateTransformer };
5
+ export { areHeadersEqual, definedOrError, buildUserAgentString, formatProgress, ProgressUpdateTransformer };
@@ -26,7 +26,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.ProgressUpdateTransformer = exports.formatProgress = exports.buildUserAgentString = exports.definedOrError = void 0;
29
+ exports.ProgressUpdateTransformer = exports.formatProgress = exports.buildUserAgentString = exports.definedOrError = exports.areHeadersEqual = void 0;
30
+ const areHeadersEqual_1 = __importDefault(require("./areHeadersEqual"));
31
+ exports.areHeadersEqual = areHeadersEqual_1.default;
30
32
  const definedOrError_1 = __importDefault(require("./definedOrError"));
31
33
  exports.definedOrError = definedOrError_1.default;
32
34
  const buildUserAgentString_1 = __importDefault(require("./buildUserAgentString"));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAA8C;AAIrC,yBAJF,wBAAc,CAIE;AAHvB,kFAA0D;AAGjC,+BAHlB,8BAAoB,CAGkB;AAF7C,mEAA6E;AAE9B,yBAFxC,wBAAc,CAEwC;AAAE,0GAFtC,0CAAyB,OAEsC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wEAAgD;AAKvC,0BALF,yBAAe,CAKE;AAJxB,sEAA8C;AAIpB,yBAJnB,wBAAc,CAImB;AAHxC,kFAA0D;AAGhB,+BAHnC,8BAAoB,CAGmC;AAF9D,mEAA6E;AAEb,yBAFzD,wBAAc,CAEyD;AAAE,0GAFvD,0CAAyB,OAEuD"}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "1.2.0";
1
+ declare const _default: "1.3.0";
2
2
  export default _default;
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '1.2.0';
3
+ exports.default = '1.3.0';
4
4
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databricks/sql",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Driver for connection to Databricks SQL via Thrift API.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,6 +14,7 @@
14
14
  "scripts": {
15
15
  "postinstall": "patch-package",
16
16
  "prepare": "npm run build",
17
+ "prepack": "mkdir dist/node_modules && cp -R node_modules/thrift dist/node_modules/thrift",
17
18
  "e2e": "nyc --reporter=lcov --report-dir=coverage_e2e mocha --config tests/e2e/.mocharc.js",
18
19
  "test": "nyc --reporter=lcov --report-dir=coverage_unit mocha --config tests/unit/.mocharc.js",
19
20
  "update-version": "node bin/update-version.js && prettier --write ./lib/version.ts",
@@ -73,12 +74,11 @@
73
74
  "apache-arrow": "^10.0.1",
74
75
  "commander": "^9.3.0",
75
76
  "node-int64": "^0.4.0",
76
- "patch-package": "^6.5.0",
77
+ "open": "^8.4.2",
78
+ "openid-client": "^5.4.2",
79
+ "patch-package": "^7.0.0",
77
80
  "thrift": "^0.16.0",
78
81
  "uuid": "^9.0.0",
79
82
  "winston": "^3.8.2"
80
- },
81
- "bundledDependencies": [
82
- "thrift"
83
- ]
83
+ }
84
84
  }
@@ -13,13 +13,20 @@ import ttypes = require('./TCLIService_types');
13
13
  import TProtocolVersion = ttypes.TProtocolVersion
14
14
  import TTypeId = ttypes.TTypeId
15
15
  import TSparkRowSetType = ttypes.TSparkRowSetType
16
+ import TDBSqlCompressionCodec = ttypes.TDBSqlCompressionCodec
17
+ import TDBSqlArrowLayout = ttypes.TDBSqlArrowLayout
16
18
  import TOperationIdempotencyType = ttypes.TOperationIdempotencyType
19
+ import TOperationTimeoutLevel = ttypes.TOperationTimeoutLevel
17
20
  import TStatusCode = ttypes.TStatusCode
18
21
  import TOperationState = ttypes.TOperationState
19
22
  import TOperationType = ttypes.TOperationType
20
23
  import TGetInfoType = ttypes.TGetInfoType
24
+ import TResultPersistenceMode = ttypes.TResultPersistenceMode
21
25
  import TCacheLookupResult = ttypes.TCacheLookupResult
26
+ import TCloudFetchDisabledReason = ttypes.TCloudFetchDisabledReason
27
+ import TDBSqlManifestFileFormat = ttypes.TDBSqlManifestFileFormat
22
28
  import TFetchOrientation = ttypes.TFetchOrientation
29
+ import TDBSqlFetchDisposition = ttypes.TDBSqlFetchDisposition
23
30
  import TJobExecutionStatus = ttypes.TJobExecutionStatus
24
31
  import PRIMITIVE_TYPES = ttypes.PRIMITIVE_TYPES
25
32
  import COMPLEX_TYPES = ttypes.COMPLEX_TYPES
@@ -58,11 +65,18 @@ import TDoubleColumn = ttypes.TDoubleColumn
58
65
  import TStringColumn = ttypes.TStringColumn
59
66
  import TBinaryColumn = ttypes.TBinaryColumn
60
67
  import TColumn = ttypes.TColumn
68
+ import TDBSqlJsonArrayFormat = ttypes.TDBSqlJsonArrayFormat
69
+ import TDBSqlCsvFormat = ttypes.TDBSqlCsvFormat
70
+ import TDBSqlArrowFormat = ttypes.TDBSqlArrowFormat
71
+ import TDBSqlResultFormat = ttypes.TDBSqlResultFormat
61
72
  import TSparkArrowBatch = ttypes.TSparkArrowBatch
62
73
  import TSparkArrowResultLink = ttypes.TSparkArrowResultLink
74
+ import TDBSqlCloudResultFile = ttypes.TDBSqlCloudResultFile
63
75
  import TRowSet = ttypes.TRowSet
64
76
  import TDBSqlTempView = ttypes.TDBSqlTempView
65
77
  import TDBSqlSessionCapabilities = ttypes.TDBSqlSessionCapabilities
78
+ import TExpressionInfo = ttypes.TExpressionInfo
79
+ import TDBSqlConfValue = ttypes.TDBSqlConfValue
66
80
  import TDBSqlSessionConf = ttypes.TDBSqlSessionConf
67
81
  import TStatus = ttypes.TStatus
68
82
  import TNamespace = ttypes.TNamespace
@@ -80,6 +94,9 @@ import TSparkGetDirectResults = ttypes.TSparkGetDirectResults
80
94
  import TSparkDirectResults = ttypes.TSparkDirectResults
81
95
  import TSparkArrowTypes = ttypes.TSparkArrowTypes
82
96
  import TExecuteStatementReq = ttypes.TExecuteStatementReq
97
+ import TDBSqlStatement = ttypes.TDBSqlStatement
98
+ import TSparkParameterValue = ttypes.TSparkParameterValue
99
+ import TSparkParameter = ttypes.TSparkParameter
83
100
  import TExecuteStatementResp = ttypes.TExecuteStatementResp
84
101
  import TGetTypeInfoReq = ttypes.TGetTypeInfoReq
85
102
  import TGetTypeInfoResp = ttypes.TGetTypeInfoResp
@@ -28,6 +28,7 @@ declare enum TProtocolVersion {
28
28
  SPARK_CLI_SERVICE_PROTOCOL_V4 = 42244,
29
29
  SPARK_CLI_SERVICE_PROTOCOL_V5 = 42245,
30
30
  SPARK_CLI_SERVICE_PROTOCOL_V6 = 42246,
31
+ SPARK_CLI_SERVICE_PROTOCOL_V7 = 42247,
31
32
  }
32
33
 
33
34
  declare enum TTypeId {
@@ -62,12 +63,28 @@ declare enum TSparkRowSetType {
62
63
  URL_BASED_SET = 3,
63
64
  }
64
65
 
66
+ declare enum TDBSqlCompressionCodec {
67
+ NONE = 0,
68
+ LZ4_FRAME = 1,
69
+ LZ4_BLOCK = 2,
70
+ }
71
+
72
+ declare enum TDBSqlArrowLayout {
73
+ ARROW_BATCH = 0,
74
+ ARROW_STREAMING = 1,
75
+ }
76
+
65
77
  declare enum TOperationIdempotencyType {
66
78
  UNKNOWN = 0,
67
79
  NON_IDEMPOTENT = 1,
68
80
  IDEMPOTENT = 2,
69
81
  }
70
82
 
83
+ declare enum TOperationTimeoutLevel {
84
+ CLUSTER = 0,
85
+ SESSION = 1,
86
+ }
87
+
71
88
  declare enum TStatusCode {
72
89
  SUCCESS_STATUS = 0,
73
90
  SUCCESS_WITH_INFO_STATUS = 1,
@@ -150,6 +167,12 @@ declare enum TGetInfoType {
150
167
  CLI_MAX_IDENTIFIER_LEN = 10005,
151
168
  }
152
169
 
170
+ declare enum TResultPersistenceMode {
171
+ ONLY_LARGE_RESULTS = 0,
172
+ ALL_QUERY_RESULTS = 1,
173
+ ALL_RESULTS = 2,
174
+ }
175
+
153
176
  declare enum TCacheLookupResult {
154
177
  CACHE_INELIGIBLE = 0,
155
178
  LOCAL_CACHE_HIT = 1,
@@ -157,6 +180,21 @@ declare enum TCacheLookupResult {
157
180
  CACHE_MISS = 3,
158
181
  }
159
182
 
183
+ declare enum TCloudFetchDisabledReason {
184
+ ARROW_SUPPORT = 0,
185
+ CLOUD_FETCH_SUPPORT = 1,
186
+ PROTOCOL_VERSION = 2,
187
+ REGION_SUPPORT = 3,
188
+ BLOCKLISTED_OPERATION = 4,
189
+ SMALL_RESULT_SIZE = 5,
190
+ CUSTOMER_STORAGE_SUPPORT = 6,
191
+ UNKNOWN = 7,
192
+ }
193
+
194
+ declare enum TDBSqlManifestFileFormat {
195
+ THRIFT_GET_RESULT_SET_METADATA_RESP = 0,
196
+ }
197
+
160
198
  declare enum TFetchOrientation {
161
199
  FETCH_NEXT = 0,
162
200
  FETCH_PRIOR = 1,
@@ -166,6 +204,13 @@ declare enum TFetchOrientation {
166
204
  FETCH_LAST = 5,
167
205
  }
168
206
 
207
+ declare enum TDBSqlFetchDisposition {
208
+ DISPOSITION_UNSPECIFIED = 0,
209
+ DISPOSITION_INLINE = 1,
210
+ DISPOSITION_EXTERNAL_LINKS = 2,
211
+ DISPOSITION_INTERNAL_DBFS = 3,
212
+ }
213
+
169
214
  declare enum TJobExecutionStatus {
170
215
  IN_PROGRESS = 0,
171
216
  COMPLETE = 1,
@@ -384,6 +429,33 @@ declare class TColumn {
384
429
  constructor(args?: { boolVal?: TBoolColumn; byteVal?: TByteColumn; i16Val?: TI16Column; i32Val?: TI32Column; i64Val?: TI64Column; doubleVal?: TDoubleColumn; stringVal?: TStringColumn; binaryVal?: TBinaryColumn; });
385
430
  }
386
431
 
432
+ declare class TDBSqlJsonArrayFormat {
433
+ public compressionCodec?: TDBSqlCompressionCodec;
434
+
435
+ constructor(args?: { compressionCodec?: TDBSqlCompressionCodec; });
436
+ }
437
+
438
+ declare class TDBSqlCsvFormat {
439
+ public compressionCodec?: TDBSqlCompressionCodec;
440
+
441
+ constructor(args?: { compressionCodec?: TDBSqlCompressionCodec; });
442
+ }
443
+
444
+ declare class TDBSqlArrowFormat {
445
+ public arrowLayout?: TDBSqlArrowLayout;
446
+ public compressionCodec?: TDBSqlCompressionCodec;
447
+
448
+ constructor(args?: { arrowLayout?: TDBSqlArrowLayout; compressionCodec?: TDBSqlCompressionCodec; });
449
+ }
450
+
451
+ declare class TDBSqlResultFormat {
452
+ public arrowFormat?: TDBSqlArrowFormat;
453
+ public csvFormat?: TDBSqlCsvFormat;
454
+ public jsonArrayFormat?: TDBSqlJsonArrayFormat;
455
+
456
+ constructor(args?: { arrowFormat?: TDBSqlArrowFormat; csvFormat?: TDBSqlCsvFormat; jsonArrayFormat?: TDBSqlJsonArrayFormat; });
457
+ }
458
+
387
459
  declare class TSparkArrowBatch {
388
460
  public batch: Buffer;
389
461
  public rowCount: Int64;
@@ -401,6 +473,18 @@ declare class TSparkArrowResultLink {
401
473
  constructor(args?: { fileLink: string; expiryTime: Int64; startRowOffset: Int64; rowCount: Int64; bytesNum: Int64; });
402
474
  }
403
475
 
476
+ declare class TDBSqlCloudResultFile {
477
+ public filePath?: string;
478
+ public startRowOffset?: Int64;
479
+ public rowCount?: Int64;
480
+ public uncompressedBytes?: Int64;
481
+ public compressedBytes?: Int64;
482
+ public fileLink?: string;
483
+ public linkExpiryTime?: Int64;
484
+
485
+ constructor(args?: { filePath?: string; startRowOffset?: Int64; rowCount?: Int64; uncompressedBytes?: Int64; compressedBytes?: Int64; fileLink?: string; linkExpiryTime?: Int64; });
486
+ }
487
+
404
488
  declare class TRowSet {
405
489
  public startRowOffset: Int64;
406
490
  public rows: TRow[];
@@ -409,8 +493,9 @@ declare class TRowSet {
409
493
  public columnCount?: number;
410
494
  public arrowBatches?: TSparkArrowBatch[];
411
495
  public resultLinks?: TSparkArrowResultLink[];
496
+ public cloudFetchResults?: TDBSqlCloudResultFile[];
412
497
 
413
- constructor(args?: { startRowOffset: Int64; rows: TRow[]; columns?: TColumn[]; binaryColumns?: Buffer; columnCount?: number; arrowBatches?: TSparkArrowBatch[]; resultLinks?: TSparkArrowResultLink[]; });
498
+ constructor(args?: { startRowOffset: Int64; rows: TRow[]; columns?: TColumn[]; binaryColumns?: Buffer; columnCount?: number; arrowBatches?: TSparkArrowBatch[]; resultLinks?: TSparkArrowResultLink[]; cloudFetchResults?: TDBSqlCloudResultFile[]; });
414
499
  }
415
500
 
416
501
  declare class TDBSqlTempView {
@@ -428,14 +513,39 @@ declare class TDBSqlSessionCapabilities {
428
513
  constructor(args?: { supportsMultipleCatalogs?: boolean; });
429
514
  }
430
515
 
516
+ declare class TExpressionInfo {
517
+ public className?: string;
518
+ public usage?: string;
519
+ public name?: string;
520
+ public extended?: string;
521
+ public db?: string;
522
+ public arguments?: string;
523
+ public examples?: string;
524
+ public note?: string;
525
+ public group?: string;
526
+ public since?: string;
527
+ public deprecated?: string;
528
+ public source?: string;
529
+
530
+ constructor(args?: { className?: string; usage?: string; name?: string; extended?: string; db?: string; arguments?: string; examples?: string; note?: string; group?: string; since?: string; deprecated?: string; source?: string; });
531
+ }
532
+
533
+ declare class TDBSqlConfValue {
534
+ public value?: string;
535
+
536
+ constructor(args?: { value?: string; });
537
+ }
538
+
431
539
  declare class TDBSqlSessionConf {
432
540
  public confs?: { [k: string]: string; };
433
541
  public tempViews?: TDBSqlTempView[];
434
542
  public currentDatabase?: string;
435
543
  public currentCatalog?: string;
436
544
  public sessionCapabilities?: TDBSqlSessionCapabilities;
545
+ public expressionsInfos?: TExpressionInfo[];
546
+ public internalConfs?: { [k: string]: TDBSqlConfValue; };
437
547
 
438
- constructor(args?: { confs?: { [k: string]: string; }; tempViews?: TDBSqlTempView[]; currentDatabase?: string; currentCatalog?: string; sessionCapabilities?: TDBSqlSessionCapabilities; });
548
+ constructor(args?: { confs?: { [k: string]: string; }; tempViews?: TDBSqlTempView[]; currentDatabase?: string; currentCatalog?: string; sessionCapabilities?: TDBSqlSessionCapabilities; expressionsInfos?: TExpressionInfo[]; internalConfs?: { [k: string]: TDBSqlConfValue; }; });
439
549
  }
440
550
 
441
551
  declare class TStatus {
@@ -444,8 +554,10 @@ declare class TStatus {
444
554
  public sqlState?: string;
445
555
  public errorCode?: number;
446
556
  public errorMessage?: string;
557
+ public displayMessage?: string;
558
+ public responseValidation?: Buffer;
447
559
 
448
- constructor(args?: { statusCode: TStatusCode; infoMessages?: string[]; sqlState?: string; errorCode?: number; errorMessage?: string; });
560
+ constructor(args?: { statusCode: TStatusCode; infoMessages?: string[]; sqlState?: string; errorCode?: number; errorMessage?: string; displayMessage?: string; responseValidation?: Buffer; });
449
561
  }
450
562
 
451
563
  declare class TNamespace {
@@ -458,8 +570,9 @@ declare class TNamespace {
458
570
  declare class THandleIdentifier {
459
571
  public guid: Buffer;
460
572
  public secret: Buffer;
573
+ public executionVersion?: number;
461
574
 
462
- constructor(args?: { guid: Buffer; secret: Buffer; });
575
+ constructor(args?: { guid: Buffer; secret: Buffer; executionVersion?: number; });
463
576
  }
464
577
 
465
578
  declare class TSessionHandle {
@@ -564,8 +677,9 @@ declare class TSparkArrowTypes {
564
677
  public decimalAsArrow?: boolean;
565
678
  public complexTypesAsArrow?: boolean;
566
679
  public intervalTypesAsArrow?: boolean;
680
+ public nullTypeAsArrow?: boolean;
567
681
 
568
- constructor(args?: { timestampAsArrow?: boolean; decimalAsArrow?: boolean; complexTypesAsArrow?: boolean; intervalTypesAsArrow?: boolean; });
682
+ constructor(args?: { timestampAsArrow?: boolean; decimalAsArrow?: boolean; complexTypesAsArrow?: boolean; intervalTypesAsArrow?: boolean; nullTypeAsArrow?: boolean; });
569
683
  }
570
684
 
571
685
  declare class TExecuteStatementReq {
@@ -580,13 +694,49 @@ declare class TExecuteStatementReq {
580
694
  public canDecompressLZ4Result?: boolean;
581
695
  public maxBytesPerFile?: Int64;
582
696
  public useArrowNativeTypes?: TSparkArrowTypes;
697
+ public resultRowLimit?: Int64;
698
+ public parameters?: TSparkParameter[];
583
699
  public operationId?: THandleIdentifier;
584
700
  public sessionConf?: TDBSqlSessionConf;
585
701
  public rejectHighCostQueries?: boolean;
586
702
  public estimatedCost?: number;
587
703
  public executionVersion?: number;
704
+ public requestValidation?: Buffer;
705
+ public resultPersistenceMode?: TResultPersistenceMode;
706
+ public trimArrowBatchesToLimit?: boolean;
707
+ public fetchDisposition?: TDBSqlFetchDisposition;
708
+ public enforceResultPersistenceMode?: boolean;
709
+ public statementList?: TDBSqlStatement[];
710
+ public persistResultManifest?: boolean;
711
+ public resultRetentionSeconds?: Int64;
712
+ public resultByteLimit?: Int64;
713
+ public resultDataFormat?: TDBSqlResultFormat;
714
+ public originatingClientIdentity?: string;
588
715
 
589
- constructor(args?: { sessionHandle: TSessionHandle; statement: string; confOverlay?: { [k: string]: string; }; runAsync?: boolean; getDirectResults?: TSparkGetDirectResults; queryTimeout?: Int64; canReadArrowResult?: boolean; canDownloadResult?: boolean; canDecompressLZ4Result?: boolean; maxBytesPerFile?: Int64; useArrowNativeTypes?: TSparkArrowTypes; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; rejectHighCostQueries?: boolean; estimatedCost?: number; executionVersion?: number; });
716
+ constructor(args?: { sessionHandle: TSessionHandle; statement: string; confOverlay?: { [k: string]: string; }; runAsync?: boolean; getDirectResults?: TSparkGetDirectResults; queryTimeout?: Int64; canReadArrowResult?: boolean; canDownloadResult?: boolean; canDecompressLZ4Result?: boolean; maxBytesPerFile?: Int64; useArrowNativeTypes?: TSparkArrowTypes; resultRowLimit?: Int64; parameters?: TSparkParameter[]; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; rejectHighCostQueries?: boolean; estimatedCost?: number; executionVersion?: number; requestValidation?: Buffer; resultPersistenceMode?: TResultPersistenceMode; trimArrowBatchesToLimit?: boolean; fetchDisposition?: TDBSqlFetchDisposition; enforceResultPersistenceMode?: boolean; statementList?: TDBSqlStatement[]; persistResultManifest?: boolean; resultRetentionSeconds?: Int64; resultByteLimit?: Int64; resultDataFormat?: TDBSqlResultFormat; originatingClientIdentity?: string; });
717
+ }
718
+
719
+ declare class TDBSqlStatement {
720
+ public statement?: string;
721
+
722
+ constructor(args?: { statement?: string; });
723
+ }
724
+
725
+ declare class TSparkParameterValue {
726
+ public stringValue?: string;
727
+ public doubleValue?: number;
728
+ public booleanValue?: boolean;
729
+
730
+ constructor(args?: { stringValue?: string; doubleValue?: number; booleanValue?: boolean; });
731
+ }
732
+
733
+ declare class TSparkParameter {
734
+ public ordinal?: number;
735
+ public name?: string;
736
+ public type?: string;
737
+ public value?: TSparkParameterValue;
738
+
739
+ constructor(args?: { ordinal?: number; name?: string; type?: string; value?: TSparkParameterValue; });
590
740
  }
591
741
 
592
742
  declare class TExecuteStatementResp {
@@ -599,8 +749,11 @@ declare class TExecuteStatementResp {
599
749
  public sessionConf?: TDBSqlSessionConf;
600
750
  public currentClusterLoad?: number;
601
751
  public idempotencyType?: TOperationIdempotencyType;
752
+ public remoteResultCacheEnabled?: boolean;
753
+ public isServerless?: boolean;
754
+ public operationHandles?: TOperationHandle[];
602
755
 
603
- constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; executionRejected?: boolean; maxClusterCapacity?: number; queryCost?: number; sessionConf?: TDBSqlSessionConf; currentClusterLoad?: number; idempotencyType?: TOperationIdempotencyType; });
756
+ constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; executionRejected?: boolean; maxClusterCapacity?: number; queryCost?: number; sessionConf?: TDBSqlSessionConf; currentClusterLoad?: number; idempotencyType?: TOperationIdempotencyType; remoteResultCacheEnabled?: boolean; isServerless?: boolean; operationHandles?: TOperationHandle[]; });
604
757
  }
605
758
 
606
759
  declare class TGetTypeInfoReq {
@@ -808,15 +961,20 @@ declare class TGetOperationStatusResp {
808
961
  public numModifiedRows?: Int64;
809
962
  public displayMessage?: string;
810
963
  public diagnosticInfo?: string;
964
+ public responseValidation?: Buffer;
965
+ public idempotencyType?: TOperationIdempotencyType;
966
+ public statementTimeout?: Int64;
967
+ public statementTimeoutLevel?: TOperationTimeoutLevel;
811
968
 
812
- constructor(args?: { status: TStatus; operationState?: TOperationState; sqlState?: string; errorCode?: number; errorMessage?: string; taskStatus?: string; operationStarted?: Int64; operationCompleted?: Int64; hasResultSet?: boolean; progressUpdateResponse?: TProgressUpdateResp; numModifiedRows?: Int64; displayMessage?: string; diagnosticInfo?: string; });
969
+ constructor(args?: { status: TStatus; operationState?: TOperationState; sqlState?: string; errorCode?: number; errorMessage?: string; taskStatus?: string; operationStarted?: Int64; operationCompleted?: Int64; hasResultSet?: boolean; progressUpdateResponse?: TProgressUpdateResp; numModifiedRows?: Int64; displayMessage?: string; diagnosticInfo?: string; responseValidation?: Buffer; idempotencyType?: TOperationIdempotencyType; statementTimeout?: Int64; statementTimeoutLevel?: TOperationTimeoutLevel; });
813
970
  }
814
971
 
815
972
  declare class TCancelOperationReq {
816
973
  public operationHandle: TOperationHandle;
817
974
  public executionVersion?: number;
975
+ public replacedByNextAttempt?: boolean;
818
976
 
819
- constructor(args?: { operationHandle: TOperationHandle; executionVersion?: number; });
977
+ constructor(args?: { operationHandle: TOperationHandle; executionVersion?: number; replacedByNextAttempt?: boolean; });
820
978
  }
821
979
 
822
980
  declare class TCancelOperationResp {
@@ -839,8 +997,9 @@ declare class TCloseOperationResp {
839
997
 
840
998
  declare class TGetResultSetMetadataReq {
841
999
  public operationHandle: TOperationHandle;
1000
+ public includeCloudResultFiles?: boolean;
842
1001
 
843
- constructor(args?: { operationHandle: TOperationHandle; });
1002
+ constructor(args?: { operationHandle: TOperationHandle; includeCloudResultFiles?: boolean; });
844
1003
  }
845
1004
 
846
1005
  declare class TGetResultSetMetadataResp {
@@ -852,8 +1011,20 @@ declare class TGetResultSetMetadataResp {
852
1011
  public cacheLookupResult?: TCacheLookupResult;
853
1012
  public uncompressedBytes?: Int64;
854
1013
  public compressedBytes?: Int64;
855
-
856
- constructor(args?: { status: TStatus; schema?: TTableSchema; resultFormat?: TSparkRowSetType; lz4Compressed?: boolean; arrowSchema?: Buffer; cacheLookupResult?: TCacheLookupResult; uncompressedBytes?: Int64; compressedBytes?: Int64; });
1014
+ public isStagingOperation?: boolean;
1015
+ public reasonForNoCloudFetch?: TCloudFetchDisabledReason;
1016
+ public resultFiles?: TDBSqlCloudResultFile[];
1017
+ public manifestFile?: string;
1018
+ public manifestFileFormat?: TDBSqlManifestFileFormat;
1019
+ public cacheLookupLatency?: Int64;
1020
+ public remoteCacheMissReason?: string;
1021
+ public fetchDisposition?: TDBSqlFetchDisposition;
1022
+ public remoteResultCacheEnabled?: boolean;
1023
+ public isServerless?: boolean;
1024
+ public resultDataFormat?: TDBSqlResultFormat;
1025
+ public truncatedByThriftLimit?: boolean;
1026
+
1027
+ constructor(args?: { status: TStatus; schema?: TTableSchema; resultFormat?: TSparkRowSetType; lz4Compressed?: boolean; arrowSchema?: Buffer; cacheLookupResult?: TCacheLookupResult; uncompressedBytes?: Int64; compressedBytes?: Int64; isStagingOperation?: boolean; reasonForNoCloudFetch?: TCloudFetchDisabledReason; resultFiles?: TDBSqlCloudResultFile[]; manifestFile?: string; manifestFileFormat?: TDBSqlManifestFileFormat; cacheLookupLatency?: Int64; remoteCacheMissReason?: string; fetchDisposition?: TDBSqlFetchDisposition; remoteResultCacheEnabled?: boolean; isServerless?: boolean; resultDataFormat?: TDBSqlResultFormat; truncatedByThriftLimit?: boolean; });
857
1028
  }
858
1029
 
859
1030
  declare class TFetchResultsReq {
@@ -873,8 +1044,9 @@ declare class TFetchResultsResp {
873
1044
  public hasMoreRows?: boolean;
874
1045
  public results?: TRowSet;
875
1046
  public resultSetMetadata?: TGetResultSetMetadataResp;
1047
+ public responseValidation?: Buffer;
876
1048
 
877
- constructor(args?: { status: TStatus; hasMoreRows?: boolean; results?: TRowSet; resultSetMetadata?: TGetResultSetMetadataResp; });
1049
+ constructor(args?: { status: TStatus; hasMoreRows?: boolean; results?: TRowSet; resultSetMetadata?: TGetResultSetMetadataResp; responseValidation?: Buffer; });
878
1050
  }
879
1051
 
880
1052
  declare class TGetDelegationTokenReq {