sqlframe 3.1.1__tar.gz → 3.3.0__tar.gz

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 (355) hide show
  1. {sqlframe-3.1.1 → sqlframe-3.3.0}/PKG-INFO +1 -1
  2. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/standalone.md +1 -1
  3. {sqlframe-3.1.1 → sqlframe-3.3.0}/setup.py +5 -5
  4. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/_version.py +2 -2
  5. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/dataframe.py +5 -1
  6. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/functions.py +2 -2
  7. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/group.py +1 -1
  8. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/session.py +5 -1
  9. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/util.py +1 -1
  10. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/duckdb/readwriter.py +5 -1
  11. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/duckdb/session.py +8 -2
  12. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/spark/catalog.py +3 -1
  13. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe.egg-info/PKG-INFO +1 -1
  14. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe.egg-info/SOURCES.txt +114 -0
  15. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe.egg-info/requires.txt +5 -5
  16. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/common_fixtures.py +55 -6
  17. sqlframe-3.3.0/tests/fixtures/employee_delta/.part-00000-e5965c7b-e58f-4d3c-ad56-002876814e3a-c000.snappy.parquet.crc +0 -0
  18. sqlframe-3.3.0/tests/fixtures/employee_delta/.part-00002-3fed7f18-370f-4b16-b232-504d6194eb52-c000.snappy.parquet.crc +0 -0
  19. sqlframe-3.3.0/tests/fixtures/employee_delta/.part-00004-143c5da1-d5ab-4706-8e84-0d2a324c6894-c000.snappy.parquet.crc +0 -0
  20. sqlframe-3.3.0/tests/fixtures/employee_delta/.part-00006-64f07e25-c30e-4075-acc6-b3c69c4ce80b-c000.snappy.parquet.crc +0 -0
  21. sqlframe-3.3.0/tests/fixtures/employee_delta/.part-00008-89ccad8d-df73-4ad5-8850-82ef3884db60-c000.snappy.parquet.crc +0 -0
  22. sqlframe-3.3.0/tests/fixtures/employee_delta/.part-00010-812b3382-8c7f-4c4e-9bcd-09ce8664f6e0-c000.snappy.parquet.crc +0 -0
  23. sqlframe-3.3.0/tests/fixtures/employee_delta/_delta_log/.00000000000000000000.json.crc +0 -0
  24. sqlframe-3.3.0/tests/fixtures/employee_delta/_delta_log/00000000000000000000.json +8 -0
  25. sqlframe-3.3.0/tests/fixtures/employee_delta/part-00000-e5965c7b-e58f-4d3c-ad56-002876814e3a-c000.snappy.parquet +0 -0
  26. sqlframe-3.3.0/tests/fixtures/employee_delta/part-00002-3fed7f18-370f-4b16-b232-504d6194eb52-c000.snappy.parquet +0 -0
  27. sqlframe-3.3.0/tests/fixtures/employee_delta/part-00004-143c5da1-d5ab-4706-8e84-0d2a324c6894-c000.snappy.parquet +0 -0
  28. sqlframe-3.3.0/tests/fixtures/employee_delta/part-00006-64f07e25-c30e-4075-acc6-b3c69c4ce80b-c000.snappy.parquet +0 -0
  29. sqlframe-3.3.0/tests/fixtures/employee_delta/part-00008-89ccad8d-df73-4ad5-8850-82ef3884db60-c000.snappy.parquet +0 -0
  30. sqlframe-3.3.0/tests/fixtures/employee_delta/part-00010-812b3382-8c7f-4c4e-9bcd-09ce8664f6e0-c000.snappy.parquet +0 -0
  31. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds1.sql +23 -0
  32. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds10.sql +65 -0
  33. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds11.sql +80 -0
  34. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds12.sql +27 -0
  35. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds13.sql +41 -0
  36. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds14.sql +134 -0
  37. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds15.sql +27 -0
  38. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds16.sql +24 -0
  39. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds17.sql +47 -0
  40. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds18.sql +49 -0
  41. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds19.sql +30 -0
  42. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds2.sql +79 -0
  43. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds20.sql +27 -0
  44. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds21.sql +30 -0
  45. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds22.sql +18 -0
  46. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds23.sql +84 -0
  47. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds24.sql +52 -0
  48. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds25.sql +40 -0
  49. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds26.sql +23 -0
  50. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds27.sql +60 -0
  51. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds28.sql +51 -0
  52. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds29.sql +41 -0
  53. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds3.sql +18 -0
  54. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds30.sql +49 -0
  55. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds31.sql +70 -0
  56. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds32.sql +16 -0
  57. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds33.sql +66 -0
  58. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds34.sql +40 -0
  59. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds35.sql +60 -0
  60. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds36.sql +58 -0
  61. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds37.sql +22 -0
  62. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds38.sql +28 -0
  63. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds39.sql +58 -0
  64. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds4.sql +119 -0
  65. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds40.sql +25 -0
  66. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds41.sql +66 -0
  67. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds42.sql +19 -0
  68. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds43.sql +49 -0
  69. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds44.sql +47 -0
  70. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds45.sql +41 -0
  71. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds46.sql +46 -0
  72. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds47.sql +71 -0
  73. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds48.sql +39 -0
  74. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds49.sql +101 -0
  75. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds5.sql +112 -0
  76. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds50.sql +67 -0
  77. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds51.sql +52 -0
  78. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds52.sql +19 -0
  79. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds53.sql +47 -0
  80. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds54.sql +57 -0
  81. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds55.sql +16 -0
  82. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds56.sql +73 -0
  83. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds57.sql +64 -0
  84. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds58.sql +70 -0
  85. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds59.sql +85 -0
  86. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds6.sql +25 -0
  87. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds60.sql +67 -0
  88. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds61.sql +46 -0
  89. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds62.sql +45 -0
  90. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds63.sql +47 -0
  91. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds64.sql +124 -0
  92. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds65.sql +37 -0
  93. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds66.sql +217 -0
  94. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds67.sql +44 -0
  95. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds68.sql +44 -0
  96. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds69.sql +51 -0
  97. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds7.sql +23 -0
  98. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds70.sql +36 -0
  99. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds71.sql +46 -0
  100. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds72.sql +38 -0
  101. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds73.sql +39 -0
  102. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds74.sql +64 -0
  103. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds75.sql +75 -0
  104. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds76.sql +55 -0
  105. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds77.sql +95 -0
  106. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds78.sql +76 -0
  107. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds79.sql +38 -0
  108. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds8.sql +427 -0
  109. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds80.sql +86 -0
  110. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds81.sql +55 -0
  111. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds82.sql +22 -0
  112. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds83.sql +70 -0
  113. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds84.sql +18 -0
  114. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds85.sql +57 -0
  115. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds86.sql +22 -0
  116. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds87.sql +30 -0
  117. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds88.sql +138 -0
  118. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds89.sql +19 -0
  119. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds9.sql +67 -0
  120. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds90.sql +26 -0
  121. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds91.sql +30 -0
  122. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds92.sql +17 -0
  123. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds93.sql +19 -0
  124. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds94.sql +24 -0
  125. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds95.sql +31 -0
  126. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds96.sql +14 -0
  127. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds97.sql +34 -0
  128. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds98.sql +26 -0
  129. sqlframe-3.3.0/tests/fixtures/tpcds/tpcds99.sql +44 -0
  130. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/duck/test_duckdb_reader.py +16 -0
  131. sqlframe-3.3.0/tests/integration/engines/duck/test_tpcds.py +32 -0
  132. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/spark/test_spark_catalog.py +13 -4
  133. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/test_int_functions.py +11 -7
  134. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/fixtures.py +4 -1
  135. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/standalone/test_functions.py +8 -4
  136. {sqlframe-3.1.1 → sqlframe-3.3.0}/.github/CODEOWNERS +0 -0
  137. {sqlframe-3.1.1 → sqlframe-3.3.0}/.github/workflows/main.workflow.yaml +0 -0
  138. {sqlframe-3.1.1 → sqlframe-3.3.0}/.github/workflows/publish.workflow.yaml +0 -0
  139. {sqlframe-3.1.1 → sqlframe-3.3.0}/.gitignore +0 -0
  140. {sqlframe-3.1.1 → sqlframe-3.3.0}/.pre-commit-config.yaml +0 -0
  141. {sqlframe-3.1.1 → sqlframe-3.3.0}/.readthedocs.yaml +0 -0
  142. {sqlframe-3.1.1 → sqlframe-3.3.0}/LICENSE +0 -0
  143. {sqlframe-3.1.1 → sqlframe-3.3.0}/Makefile +0 -0
  144. {sqlframe-3.1.1 → sqlframe-3.3.0}/README.md +0 -0
  145. {sqlframe-3.1.1 → sqlframe-3.3.0}/blogs/add_chatgpt_support.md +0 -0
  146. {sqlframe-3.1.1 → sqlframe-3.3.0}/blogs/images/add_chatgpt_support/adding_ai_to_meal.jpeg +0 -0
  147. {sqlframe-3.1.1 → sqlframe-3.3.0}/blogs/images/add_chatgpt_support/hype_train.gif +0 -0
  148. {sqlframe-3.1.1 → sqlframe-3.3.0}/blogs/images/add_chatgpt_support/marvin_paranoid_robot.gif +0 -0
  149. {sqlframe-3.1.1 → sqlframe-3.3.0}/blogs/images/add_chatgpt_support/nonsense_sql.png +0 -0
  150. {sqlframe-3.1.1 → sqlframe-3.3.0}/blogs/images/add_chatgpt_support/openai_full_rewrite.png +0 -0
  151. {sqlframe-3.1.1 → sqlframe-3.3.0}/blogs/images/add_chatgpt_support/openai_replacing_cte_names.png +0 -0
  152. {sqlframe-3.1.1 → sqlframe-3.3.0}/blogs/images/add_chatgpt_support/sqlglot_optimized_code.png +0 -0
  153. {sqlframe-3.1.1 → sqlframe-3.3.0}/blogs/images/add_chatgpt_support/sunny_shake_head_no.gif +0 -0
  154. {sqlframe-3.1.1 → sqlframe-3.3.0}/blogs/images/but_wait_theres_more.gif +0 -0
  155. {sqlframe-3.1.1 → sqlframe-3.3.0}/blogs/images/cake.gif +0 -0
  156. {sqlframe-3.1.1 → sqlframe-3.3.0}/blogs/images/you_get_pyspark_api.gif +0 -0
  157. {sqlframe-3.1.1 → sqlframe-3.3.0}/blogs/sqlframe_universal_dataframe_api.md +0 -0
  158. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/bigquery.md +0 -0
  159. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/configuration.md +0 -0
  160. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/docs/bigquery.md +0 -0
  161. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/docs/duckdb.md +0 -0
  162. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/docs/images/SF.png +0 -0
  163. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/docs/images/favicon.png +0 -0
  164. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/docs/images/favicon_old.png +0 -0
  165. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/docs/images/sqlframe_diagram.png +0 -0
  166. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/docs/images/sqlframe_logo.png +0 -0
  167. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/docs/postgres.md +0 -0
  168. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/duckdb.md +0 -0
  169. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/images/SF.png +0 -0
  170. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/images/favicon.png +0 -0
  171. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/images/favicon_old.png +0 -0
  172. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/images/sqlframe_diagram.png +0 -0
  173. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/images/sqlframe_logo.png +0 -0
  174. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/index.md +0 -0
  175. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/postgres.md +0 -0
  176. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/requirements.txt +0 -0
  177. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/snowflake.md +0 -0
  178. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/spark.md +0 -0
  179. {sqlframe-3.1.1 → sqlframe-3.3.0}/docs/stylesheets/extra.css +0 -0
  180. {sqlframe-3.1.1 → sqlframe-3.3.0}/mkdocs.yml +0 -0
  181. {sqlframe-3.1.1 → sqlframe-3.3.0}/pytest.ini +0 -0
  182. {sqlframe-3.1.1 → sqlframe-3.3.0}/renovate.json +0 -0
  183. {sqlframe-3.1.1 → sqlframe-3.3.0}/setup.cfg +0 -0
  184. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/LICENSE +0 -0
  185. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/__init__.py +0 -0
  186. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/__init__.py +0 -0
  187. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/_typing.py +0 -0
  188. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/catalog.py +0 -0
  189. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/column.py +0 -0
  190. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/decorators.py +0 -0
  191. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/exceptions.py +0 -0
  192. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/function_alternatives.py +0 -0
  193. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/mixins/__init__.py +0 -0
  194. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/mixins/catalog_mixins.py +0 -0
  195. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/mixins/dataframe_mixins.py +0 -0
  196. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/mixins/readwriter_mixins.py +0 -0
  197. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/normalize.py +0 -0
  198. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/operations.py +0 -0
  199. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/readerwriter.py +0 -0
  200. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/transforms.py +0 -0
  201. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/types.py +0 -0
  202. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/udf.py +0 -0
  203. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/base/window.py +0 -0
  204. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/bigquery/__init__.py +0 -0
  205. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/bigquery/catalog.py +0 -0
  206. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/bigquery/column.py +0 -0
  207. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/bigquery/dataframe.py +0 -0
  208. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/bigquery/functions.py +0 -0
  209. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/bigquery/functions.pyi +0 -0
  210. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/bigquery/group.py +0 -0
  211. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/bigquery/readwriter.py +0 -0
  212. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/bigquery/session.py +0 -0
  213. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/bigquery/types.py +0 -0
  214. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/bigquery/udf.py +0 -0
  215. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/bigquery/window.py +0 -0
  216. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/duckdb/__init__.py +0 -0
  217. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/duckdb/catalog.py +0 -0
  218. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/duckdb/column.py +0 -0
  219. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/duckdb/dataframe.py +0 -0
  220. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/duckdb/functions.py +0 -0
  221. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/duckdb/functions.pyi +0 -0
  222. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/duckdb/group.py +0 -0
  223. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/duckdb/types.py +0 -0
  224. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/duckdb/udf.py +0 -0
  225. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/duckdb/window.py +0 -0
  226. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/postgres/__init__.py +0 -0
  227. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/postgres/catalog.py +0 -0
  228. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/postgres/column.py +0 -0
  229. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/postgres/dataframe.py +0 -0
  230. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/postgres/functions.py +0 -0
  231. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/postgres/functions.pyi +0 -0
  232. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/postgres/group.py +0 -0
  233. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/postgres/readwriter.py +0 -0
  234. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/postgres/session.py +0 -0
  235. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/postgres/types.py +0 -0
  236. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/postgres/udf.py +0 -0
  237. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/postgres/window.py +0 -0
  238. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/redshift/__init__.py +0 -0
  239. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/redshift/catalog.py +0 -0
  240. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/redshift/column.py +0 -0
  241. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/redshift/dataframe.py +0 -0
  242. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/redshift/functions.py +0 -0
  243. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/redshift/group.py +0 -0
  244. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/redshift/readwriter.py +0 -0
  245. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/redshift/session.py +0 -0
  246. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/redshift/types.py +0 -0
  247. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/redshift/udf.py +0 -0
  248. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/redshift/window.py +0 -0
  249. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/snowflake/__init__.py +0 -0
  250. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/snowflake/catalog.py +0 -0
  251. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/snowflake/column.py +0 -0
  252. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/snowflake/dataframe.py +0 -0
  253. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/snowflake/functions.py +0 -0
  254. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/snowflake/functions.pyi +0 -0
  255. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/snowflake/group.py +0 -0
  256. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/snowflake/readwriter.py +0 -0
  257. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/snowflake/session.py +0 -0
  258. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/snowflake/types.py +0 -0
  259. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/snowflake/udf.py +0 -0
  260. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/snowflake/window.py +0 -0
  261. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/spark/__init__.py +0 -0
  262. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/spark/column.py +0 -0
  263. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/spark/dataframe.py +0 -0
  264. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/spark/functions.py +0 -0
  265. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/spark/functions.pyi +0 -0
  266. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/spark/group.py +0 -0
  267. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/spark/readwriter.py +0 -0
  268. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/spark/session.py +0 -0
  269. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/spark/types.py +0 -0
  270. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/spark/udf.py +0 -0
  271. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/spark/window.py +0 -0
  272. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/standalone/__init__.py +0 -0
  273. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/standalone/catalog.py +0 -0
  274. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/standalone/column.py +0 -0
  275. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/standalone/dataframe.py +0 -0
  276. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/standalone/functions.py +0 -0
  277. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/standalone/group.py +0 -0
  278. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/standalone/readwriter.py +0 -0
  279. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/standalone/session.py +0 -0
  280. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/standalone/types.py +0 -0
  281. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/standalone/udf.py +0 -0
  282. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/standalone/window.py +0 -0
  283. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/testing/__init__.py +0 -0
  284. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe/testing/utils.py +0 -0
  285. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe.egg-info/dependency_links.txt +0 -0
  286. {sqlframe-3.1.1 → sqlframe-3.3.0}/sqlframe.egg-info/top_level.txt +0 -0
  287. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/__init__.py +0 -0
  288. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/conftest.py +0 -0
  289. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/fixtures/employee.csv +0 -0
  290. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/fixtures/employee.json +0 -0
  291. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/fixtures/employee.parquet +0 -0
  292. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/fixtures/employee_extra_line.csv +0 -0
  293. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/__init__.py +0 -0
  294. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/__init__.py +0 -0
  295. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/bigquery/__init__.py +0 -0
  296. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/bigquery/test_bigquery_catalog.py +0 -0
  297. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/bigquery/test_bigquery_dataframe.py +0 -0
  298. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/bigquery/test_bigquery_session.py +0 -0
  299. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/duck/__init__.py +0 -0
  300. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/duck/test_duckdb_activate.py +0 -0
  301. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/duck/test_duckdb_catalog.py +0 -0
  302. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/duck/test_duckdb_dataframe.py +0 -0
  303. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/duck/test_duckdb_session.py +0 -0
  304. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/duck/test_duckdb_udf.py +0 -0
  305. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/postgres/__init__.py +0 -0
  306. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/postgres/test_postgres_activate.py +0 -0
  307. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/postgres/test_postgres_catalog.py +0 -0
  308. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/postgres/test_postgres_dataframe.py +0 -0
  309. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/postgres/test_postgres_session.py +0 -0
  310. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/redshift/__init__.py +0 -0
  311. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/redshift/test_redshift_catalog.py +0 -0
  312. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/redshift/test_redshift_session.py +0 -0
  313. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/snowflake/__init__.py +0 -0
  314. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/snowflake/test_snowflake_catalog.py +0 -0
  315. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/snowflake/test_snowflake_dataframe.py +0 -0
  316. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/snowflake/test_snowflake_session.py +0 -0
  317. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/spark/__init__.py +0 -0
  318. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/spark/test_spark_dataframe.py +0 -0
  319. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/test_engine_column.py +0 -0
  320. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/test_engine_dataframe.py +0 -0
  321. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/test_engine_reader.py +0 -0
  322. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/test_engine_session.py +0 -0
  323. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/test_engine_writer.py +0 -0
  324. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/engines/test_int_testing.py +0 -0
  325. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/test_int_dataframe.py +0 -0
  326. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/test_int_dataframe_stats.py +0 -0
  327. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/test_int_grouped_data.py +0 -0
  328. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/integration/test_int_session.py +0 -0
  329. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/types.py +0 -0
  330. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/__init__.py +0 -0
  331. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/bigquery/__init__.py +0 -0
  332. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/bigquery/test_activate.py +0 -0
  333. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/conftest.py +0 -0
  334. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/duck/__init__.py +0 -0
  335. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/duck/test_activate.py +0 -0
  336. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/postgres/__init__.py +0 -0
  337. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/postgres/test_activate.py +0 -0
  338. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/redshift/__init__.py +0 -0
  339. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/redshift/test_activate.py +0 -0
  340. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/snowflake/__init__.py +0 -0
  341. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/snowflake/test_activate.py +0 -0
  342. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/spark/__init__.py +0 -0
  343. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/spark/test_activate.py +0 -0
  344. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/standalone/__init__.py +0 -0
  345. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/standalone/fixtures.py +0 -0
  346. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/standalone/test_activate.py +0 -0
  347. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/standalone/test_column.py +0 -0
  348. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/standalone/test_dataframe.py +0 -0
  349. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/standalone/test_dataframe_writer.py +0 -0
  350. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/standalone/test_session.py +0 -0
  351. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/standalone/test_session_case_sensitivity.py +0 -0
  352. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/standalone/test_types.py +0 -0
  353. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/standalone/test_window.py +0 -0
  354. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/test_activate.py +0 -0
  355. {sqlframe-3.1.1 → sqlframe-3.3.0}/tests/unit/test_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sqlframe
3
- Version: 3.1.1
3
+ Version: 3.3.0
4
4
  Summary: Turning PySpark Into a Universal DataFrame API
5
5
  Home-page: https://github.com/eakmanrq/sqlframe
6
6
  Author: Ryan Eakman
@@ -84,7 +84,7 @@ from sqlframe.standalone import StandaloneSession
84
84
  session = StandaloneSession()
85
85
 
86
86
  session.catalog.add_table("test_table", column_mapping={"a": "int", "b": "int", "c": "int"})
87
- df = session.read.table("my_table")
87
+ df = session.read.table("test_table")
88
88
  df.sql()
89
89
  ```
90
90
 
@@ -20,7 +20,7 @@ setup(
20
20
  python_requires=">=3.8",
21
21
  install_requires=[
22
22
  "prettytable<3.11.1",
23
- "sqlglot>=24.0.0,<25.18",
23
+ "sqlglot>=24.0.0,<25.22",
24
24
  "typing_extensions>=4.8,<5",
25
25
  ],
26
26
  extras_require={
@@ -29,10 +29,10 @@ setup(
29
29
  "google-cloud-bigquery-storage>=2,<3",
30
30
  ],
31
31
  "dev": [
32
- "duckdb>=0.9,<1.1",
32
+ "duckdb>=0.9,<1.2",
33
33
  "findspark>=2,<3",
34
34
  "mypy>=1.10.0,<1.12",
35
- "openai>=1.30,<1.43",
35
+ "openai>=1.30,<1.46",
36
36
  "pandas>=2,<3",
37
37
  "pandas-stubs>=2,<3",
38
38
  "psycopg>=3.1,<4",
@@ -54,11 +54,11 @@ setup(
54
54
  "pymdown-extensions",
55
55
  ],
56
56
  "duckdb": [
57
- "duckdb>=0.9,<1.1",
57
+ "duckdb>=0.9,<1.2",
58
58
  "pandas>=2,<3",
59
59
  ],
60
60
  "openai": [
61
- "openai>=1.30,<1.43",
61
+ "openai>=1.30,<1.46",
62
62
  ],
63
63
  "pandas": [
64
64
  "pandas>=2,<3",
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '3.1.1'
16
- __version_tuple__ = version_tuple = (3, 1, 1)
15
+ __version__ = version = '3.3.0'
16
+ __version_tuple__ = version_tuple = (3, 3, 0)
@@ -1627,7 +1627,11 @@ class _BaseDataFrame(t.Generic[SESSION, WRITER, NA, STAT, GROUP_DATA]):
1627
1627
 
1628
1628
  def createOrReplaceTempView(self, name: str) -> None:
1629
1629
  name = normalize_string(name, from_dialect="input")
1630
- self.session.temp_views[name] = self.copy()._convert_leaf_to_cte()
1630
+ df = self.copy()._convert_leaf_to_cte()
1631
+ self.session.temp_views[name] = df
1632
+ self.session.catalog.add_table(
1633
+ name, [x.alias_or_name for x in self._get_outer_select_columns(df.expression)]
1634
+ )
1631
1635
 
1632
1636
  def count(self) -> int:
1633
1637
  if not self.session._has_connection:
@@ -2052,7 +2052,7 @@ def cardinality(col: ColumnOrName) -> Column:
2052
2052
 
2053
2053
  @meta()
2054
2054
  def char(col: ColumnOrName) -> Column:
2055
- return Column.invoke_expression_over_column(col, expression.Chr)
2055
+ return Column(expression.Chr(expressions=Column.ensure_col(col).expression))
2056
2056
 
2057
2057
 
2058
2058
  @meta(unsupported_engines="*")
@@ -2703,7 +2703,7 @@ def inline(col: ColumnOrName) -> Column:
2703
2703
  | 3| 4|
2704
2704
  +---+---+
2705
2705
  """
2706
- return Column.invoke_anonymous_function(col, "inline")
2706
+ return Column.invoke_expression_over_column(col, expression.Inline)
2707
2707
 
2708
2708
 
2709
2709
  @meta(unsupported_engines="*")
@@ -68,7 +68,7 @@ class _BaseGroupedData(t.Generic[DF]):
68
68
  )
69
69
  group_by_cols.extend(grouping_set) # type: ignore
70
70
  group_by_cols = list(dict.fromkeys(group_by_cols))
71
- group_by = exp.Group(grouping_sets=all_grouping_sets)
71
+ group_by = exp.Group(grouping_sets=[exp.GroupingSets(expressions=all_grouping_sets)])
72
72
  expression.set("group", group_by)
73
73
  for col in cols:
74
74
  # Spark supports having an empty grouping_id which means all of the columns but other dialects
@@ -391,7 +391,11 @@ class _BaseSession(t.Generic[CATALOG, READER, WRITER, DF, CONN, UDF_REGISTRATION
391
391
  )
392
392
  if qualify:
393
393
  expression = qualify_func(
394
- expression, dialect=dialect, quote_identifiers=False, identify=False
394
+ expression,
395
+ dialect=dialect,
396
+ quote_identifiers=False,
397
+ identify=False,
398
+ schema=self.catalog._schema,
395
399
  )
396
400
  if self.temp_views:
397
401
  replacement_mapping = {}
@@ -306,7 +306,6 @@ def quote_preserving_alias_or_name(col: t.Union[exp.Column, exp.Alias]) -> str:
306
306
  def sqlglot_to_spark(sqlglot_dtype: exp.DataType) -> types.DataType:
307
307
  from sqlframe.base import types
308
308
 
309
- sqlglot_to_spark
310
309
  primitive_mapping = {
311
310
  exp.DataType.Type.VARCHAR: types.VarcharType,
312
311
  exp.DataType.Type.CHAR: types.CharType,
@@ -325,6 +324,7 @@ def sqlglot_to_spark(sqlglot_dtype: exp.DataType) -> types.DataType:
325
324
  exp.DataType.Type.TIMESTAMPLTZ: types.TimestampType,
326
325
  exp.DataType.Type.TIMESTAMPNTZ: types.TimestampType,
327
326
  exp.DataType.Type.DATE: types.DateType,
327
+ exp.DataType.Type.JSON: types.StringType,
328
328
  }
329
329
  if sqlglot_dtype.this in primitive_mapping:
330
330
  pyspark_class = primitive_mapping[sqlglot_dtype.this]
@@ -85,12 +85,16 @@ class DuckDBDataFrameReader(_BaseDataFrameReader["DuckDBSession", "DuckDBDataFra
85
85
  options["columns"] = "{" + duckdb_columns + "}"
86
86
  else:
87
87
  select_columns = [exp.Star()]
88
- if format:
88
+ if format == "delta":
89
+ from_clause = f"delta_scan('{path}')"
90
+ elif format:
89
91
  paths = ",".join([f"'{path}'" for path in ensure_list(path)])
90
92
  from_clause = f"read_{format}([{paths}], {to_csv(options)})"
91
93
  else:
92
94
  from_clause = f"'{path}'"
93
95
  df = self.session.sql(exp.select(*select_columns).from_(from_clause), qualify=False)
96
+ if select_columns == [exp.Star()]:
97
+ return self.load(path=path, format=format, schema=df.schema, **options)
94
98
  self.session._last_loaded_file = path # type: ignore
95
99
  return df
96
100
 
@@ -54,8 +54,14 @@ class DuckDBSession(
54
54
 
55
55
  @classmethod
56
56
  def _try_get_map(cls, value: t.Any) -> t.Optional[t.Dict[str, t.Any]]:
57
- if value and isinstance(value, dict) and "key" in value and "value" in value:
58
- return dict(zip(value["key"], value["value"]))
57
+ if value and isinstance(value, dict):
58
+ # DuckDB < 1.1.0 support
59
+ if "key" in value and "value" in value:
60
+ return dict(zip(value["key"], value["value"]))
61
+ # DuckDB >= 1.1.0 support
62
+ # If a key is not a string then it must not represent a column and therefore must be a map
63
+ if len([k for k in value if not isinstance(k, str)]) > 0:
64
+ return value
59
65
  return None
60
66
 
61
67
  def _execute(self, sql: str) -> None:
@@ -569,7 +569,9 @@ class SparkCatalog(
569
569
  return [
570
570
  Table(
571
571
  name=normalize_string(x.name, from_dialect="execution", to_dialect="output"),
572
- catalog=normalize_string(x.catalog, from_dialect="execution", to_dialect="output"),
572
+ catalog=normalize_string(x.catalog, from_dialect="execution", to_dialect="output")
573
+ if x.catalog
574
+ else None,
573
575
  namespace=[
574
576
  normalize_string(y, from_dialect="execution", to_dialect="output")
575
577
  for y in x.namespace
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sqlframe
3
- Version: 3.1.1
3
+ Version: 3.3.0
4
4
  Summary: Turning PySpark Into a Universal DataFrame API
5
5
  Home-page: https://github.com/eakmanrq/sqlframe
6
6
  Author: Ryan Eakman
@@ -171,6 +171,119 @@ tests/fixtures/employee.csv
171
171
  tests/fixtures/employee.json
172
172
  tests/fixtures/employee.parquet
173
173
  tests/fixtures/employee_extra_line.csv
174
+ tests/fixtures/employee_delta/.part-00000-e5965c7b-e58f-4d3c-ad56-002876814e3a-c000.snappy.parquet.crc
175
+ tests/fixtures/employee_delta/.part-00002-3fed7f18-370f-4b16-b232-504d6194eb52-c000.snappy.parquet.crc
176
+ tests/fixtures/employee_delta/.part-00004-143c5da1-d5ab-4706-8e84-0d2a324c6894-c000.snappy.parquet.crc
177
+ tests/fixtures/employee_delta/.part-00006-64f07e25-c30e-4075-acc6-b3c69c4ce80b-c000.snappy.parquet.crc
178
+ tests/fixtures/employee_delta/.part-00008-89ccad8d-df73-4ad5-8850-82ef3884db60-c000.snappy.parquet.crc
179
+ tests/fixtures/employee_delta/.part-00010-812b3382-8c7f-4c4e-9bcd-09ce8664f6e0-c000.snappy.parquet.crc
180
+ tests/fixtures/employee_delta/part-00000-e5965c7b-e58f-4d3c-ad56-002876814e3a-c000.snappy.parquet
181
+ tests/fixtures/employee_delta/part-00002-3fed7f18-370f-4b16-b232-504d6194eb52-c000.snappy.parquet
182
+ tests/fixtures/employee_delta/part-00004-143c5da1-d5ab-4706-8e84-0d2a324c6894-c000.snappy.parquet
183
+ tests/fixtures/employee_delta/part-00006-64f07e25-c30e-4075-acc6-b3c69c4ce80b-c000.snappy.parquet
184
+ tests/fixtures/employee_delta/part-00008-89ccad8d-df73-4ad5-8850-82ef3884db60-c000.snappy.parquet
185
+ tests/fixtures/employee_delta/part-00010-812b3382-8c7f-4c4e-9bcd-09ce8664f6e0-c000.snappy.parquet
186
+ tests/fixtures/employee_delta/_delta_log/.00000000000000000000.json.crc
187
+ tests/fixtures/employee_delta/_delta_log/00000000000000000000.json
188
+ tests/fixtures/tpcds/tpcds1.sql
189
+ tests/fixtures/tpcds/tpcds10.sql
190
+ tests/fixtures/tpcds/tpcds11.sql
191
+ tests/fixtures/tpcds/tpcds12.sql
192
+ tests/fixtures/tpcds/tpcds13.sql
193
+ tests/fixtures/tpcds/tpcds14.sql
194
+ tests/fixtures/tpcds/tpcds15.sql
195
+ tests/fixtures/tpcds/tpcds16.sql
196
+ tests/fixtures/tpcds/tpcds17.sql
197
+ tests/fixtures/tpcds/tpcds18.sql
198
+ tests/fixtures/tpcds/tpcds19.sql
199
+ tests/fixtures/tpcds/tpcds2.sql
200
+ tests/fixtures/tpcds/tpcds20.sql
201
+ tests/fixtures/tpcds/tpcds21.sql
202
+ tests/fixtures/tpcds/tpcds22.sql
203
+ tests/fixtures/tpcds/tpcds23.sql
204
+ tests/fixtures/tpcds/tpcds24.sql
205
+ tests/fixtures/tpcds/tpcds25.sql
206
+ tests/fixtures/tpcds/tpcds26.sql
207
+ tests/fixtures/tpcds/tpcds27.sql
208
+ tests/fixtures/tpcds/tpcds28.sql
209
+ tests/fixtures/tpcds/tpcds29.sql
210
+ tests/fixtures/tpcds/tpcds3.sql
211
+ tests/fixtures/tpcds/tpcds30.sql
212
+ tests/fixtures/tpcds/tpcds31.sql
213
+ tests/fixtures/tpcds/tpcds32.sql
214
+ tests/fixtures/tpcds/tpcds33.sql
215
+ tests/fixtures/tpcds/tpcds34.sql
216
+ tests/fixtures/tpcds/tpcds35.sql
217
+ tests/fixtures/tpcds/tpcds36.sql
218
+ tests/fixtures/tpcds/tpcds37.sql
219
+ tests/fixtures/tpcds/tpcds38.sql
220
+ tests/fixtures/tpcds/tpcds39.sql
221
+ tests/fixtures/tpcds/tpcds4.sql
222
+ tests/fixtures/tpcds/tpcds40.sql
223
+ tests/fixtures/tpcds/tpcds41.sql
224
+ tests/fixtures/tpcds/tpcds42.sql
225
+ tests/fixtures/tpcds/tpcds43.sql
226
+ tests/fixtures/tpcds/tpcds44.sql
227
+ tests/fixtures/tpcds/tpcds45.sql
228
+ tests/fixtures/tpcds/tpcds46.sql
229
+ tests/fixtures/tpcds/tpcds47.sql
230
+ tests/fixtures/tpcds/tpcds48.sql
231
+ tests/fixtures/tpcds/tpcds49.sql
232
+ tests/fixtures/tpcds/tpcds5.sql
233
+ tests/fixtures/tpcds/tpcds50.sql
234
+ tests/fixtures/tpcds/tpcds51.sql
235
+ tests/fixtures/tpcds/tpcds52.sql
236
+ tests/fixtures/tpcds/tpcds53.sql
237
+ tests/fixtures/tpcds/tpcds54.sql
238
+ tests/fixtures/tpcds/tpcds55.sql
239
+ tests/fixtures/tpcds/tpcds56.sql
240
+ tests/fixtures/tpcds/tpcds57.sql
241
+ tests/fixtures/tpcds/tpcds58.sql
242
+ tests/fixtures/tpcds/tpcds59.sql
243
+ tests/fixtures/tpcds/tpcds6.sql
244
+ tests/fixtures/tpcds/tpcds60.sql
245
+ tests/fixtures/tpcds/tpcds61.sql
246
+ tests/fixtures/tpcds/tpcds62.sql
247
+ tests/fixtures/tpcds/tpcds63.sql
248
+ tests/fixtures/tpcds/tpcds64.sql
249
+ tests/fixtures/tpcds/tpcds65.sql
250
+ tests/fixtures/tpcds/tpcds66.sql
251
+ tests/fixtures/tpcds/tpcds67.sql
252
+ tests/fixtures/tpcds/tpcds68.sql
253
+ tests/fixtures/tpcds/tpcds69.sql
254
+ tests/fixtures/tpcds/tpcds7.sql
255
+ tests/fixtures/tpcds/tpcds70.sql
256
+ tests/fixtures/tpcds/tpcds71.sql
257
+ tests/fixtures/tpcds/tpcds72.sql
258
+ tests/fixtures/tpcds/tpcds73.sql
259
+ tests/fixtures/tpcds/tpcds74.sql
260
+ tests/fixtures/tpcds/tpcds75.sql
261
+ tests/fixtures/tpcds/tpcds76.sql
262
+ tests/fixtures/tpcds/tpcds77.sql
263
+ tests/fixtures/tpcds/tpcds78.sql
264
+ tests/fixtures/tpcds/tpcds79.sql
265
+ tests/fixtures/tpcds/tpcds8.sql
266
+ tests/fixtures/tpcds/tpcds80.sql
267
+ tests/fixtures/tpcds/tpcds81.sql
268
+ tests/fixtures/tpcds/tpcds82.sql
269
+ tests/fixtures/tpcds/tpcds83.sql
270
+ tests/fixtures/tpcds/tpcds84.sql
271
+ tests/fixtures/tpcds/tpcds85.sql
272
+ tests/fixtures/tpcds/tpcds86.sql
273
+ tests/fixtures/tpcds/tpcds87.sql
274
+ tests/fixtures/tpcds/tpcds88.sql
275
+ tests/fixtures/tpcds/tpcds89.sql
276
+ tests/fixtures/tpcds/tpcds9.sql
277
+ tests/fixtures/tpcds/tpcds90.sql
278
+ tests/fixtures/tpcds/tpcds91.sql
279
+ tests/fixtures/tpcds/tpcds92.sql
280
+ tests/fixtures/tpcds/tpcds93.sql
281
+ tests/fixtures/tpcds/tpcds94.sql
282
+ tests/fixtures/tpcds/tpcds95.sql
283
+ tests/fixtures/tpcds/tpcds96.sql
284
+ tests/fixtures/tpcds/tpcds97.sql
285
+ tests/fixtures/tpcds/tpcds98.sql
286
+ tests/fixtures/tpcds/tpcds99.sql
174
287
  tests/integration/__init__.py
175
288
  tests/integration/fixtures.py
176
289
  tests/integration/test_int_dataframe.py
@@ -196,6 +309,7 @@ tests/integration/engines/duck/test_duckdb_dataframe.py
196
309
  tests/integration/engines/duck/test_duckdb_reader.py
197
310
  tests/integration/engines/duck/test_duckdb_session.py
198
311
  tests/integration/engines/duck/test_duckdb_udf.py
312
+ tests/integration/engines/duck/test_tpcds.py
199
313
  tests/integration/engines/postgres/__init__.py
200
314
  tests/integration/engines/postgres/test_postgres_activate.py
201
315
  tests/integration/engines/postgres/test_postgres_catalog.py
@@ -1,5 +1,5 @@
1
1
  prettytable<3.11.1
2
- sqlglot<25.18,>=24.0.0
2
+ sqlglot<25.22,>=24.0.0
3
3
  typing_extensions<5,>=4.8
4
4
 
5
5
  [bigquery]
@@ -7,10 +7,10 @@ google-cloud-bigquery-storage<3,>=2
7
7
  google-cloud-bigquery[pandas]<4,>=3
8
8
 
9
9
  [dev]
10
- duckdb<1.1,>=0.9
10
+ duckdb<1.2,>=0.9
11
11
  findspark<3,>=2
12
12
  mypy<1.12,>=1.10.0
13
- openai<1.43,>=1.30
13
+ openai<1.46,>=1.30
14
14
  pandas-stubs<3,>=2
15
15
  pandas<3,>=2
16
16
  psycopg<4,>=3.1
@@ -36,11 +36,11 @@ mkdocs==1.4.2
36
36
  pymdown-extensions
37
37
 
38
38
  [duckdb]
39
- duckdb<1.1,>=0.9
39
+ duckdb<1.2,>=0.9
40
40
  pandas<3,>=2
41
41
 
42
42
  [openai]
43
- openai<1.43,>=1.30
43
+ openai<1.46,>=1.30
44
44
 
45
45
  [pandas]
46
46
  pandas<3,>=2
@@ -2,12 +2,15 @@ from __future__ import annotations
2
2
 
3
3
  import os
4
4
  import typing as t
5
+ from pathlib import Path
5
6
 
7
+ import duckdb
6
8
  import pytest
7
9
  from pyspark import SparkConf
8
10
  from pyspark.sql import SparkSession as PySparkSession
9
11
  from pytest_postgresql.janitor import DatabaseJanitor
10
12
 
13
+ from sqlframe.base.session import _BaseSession
11
14
  from sqlframe.bigquery.session import BigQuerySession
12
15
  from sqlframe.duckdb.session import DuckDBSession
13
16
  from sqlframe.postgres.session import PostgresSession
@@ -28,8 +31,57 @@ if t.TYPE_CHECKING:
28
31
  from tests.types import EmployeeData
29
32
 
30
33
 
34
+ def load_tpcds(paths: t.List[Path], session: t.Union[_BaseSession, PySparkSession]):
35
+ for path in paths:
36
+ table_name = path.name
37
+ session.read.parquet(str(path / "*.parquet")).createOrReplaceTempView(table_name)
38
+
39
+
31
40
  @pytest.fixture(scope="session")
32
- def pyspark_session(tmp_path_factory) -> PySparkSession:
41
+ def gen_tpcds(tmp_path_factory) -> t.List[Path]:
42
+ path_root = tmp_path_factory.mktemp("tpcds")
43
+ results = []
44
+ tables = [
45
+ "web_site",
46
+ "web_sales",
47
+ "web_returns",
48
+ "web_page",
49
+ "warehouse",
50
+ "time_dim",
51
+ "store_sales",
52
+ "store_returns",
53
+ "store",
54
+ "ship_mode",
55
+ "reason",
56
+ "promotion",
57
+ "item",
58
+ "inventory",
59
+ "income_band",
60
+ "household_demographics",
61
+ "date_dim",
62
+ "customer_demographics",
63
+ "customer_address",
64
+ "customer",
65
+ "catalog_sales",
66
+ "catalog_returns",
67
+ "catalog_page",
68
+ "call_center",
69
+ ]
70
+ con = duckdb.connect()
71
+ con.sql("CALL dsdgen(sf=0.01)")
72
+ for table in tables:
73
+ path = path_root / table
74
+ path.mkdir(parents=True)
75
+ con.sql(
76
+ f"COPY (SELECT * FROM {table}) TO '{path}' (FORMAT PARQUET, PER_THREAD_OUTPUT TRUE)"
77
+ )
78
+ results.append(path)
79
+ con.close()
80
+ return results
81
+
82
+
83
+ @pytest.fixture(scope="session")
84
+ def pyspark_session(tmp_path_factory, gen_tpcds: t.List[Path]) -> PySparkSession:
33
85
  data_dir = tmp_path_factory.mktemp("spark_connection")
34
86
  derby_dir = tmp_path_factory.mktemp("derby")
35
87
  spark = (
@@ -49,6 +101,7 @@ def pyspark_session(tmp_path_factory) -> PySparkSession:
49
101
  spark.sql("CREATE TABLE db1.table1 (id INTEGER, name STRING)")
50
102
  spark.catalog.registerFunction("add", lambda x, y: x + y)
51
103
  spark.catalog.setCurrentDatabase("db1")
104
+ load_tpcds(gen_tpcds, spark)
52
105
  return spark
53
106
 
54
107
 
@@ -64,11 +117,7 @@ def spark_session(pyspark_session: PySparkSession) -> SparkSession:
64
117
 
65
118
  @pytest.fixture(scope="function")
66
119
  def duckdb_session() -> DuckDBSession:
67
- from duckdb import connect
68
-
69
- # https://github.com/duckdb/duckdb/issues/11404
70
- connection = connect()
71
- connection.sql("set TimeZone = 'UTC'")
120
+ connection = duckdb.connect(config={"TimeZone": "UTC"})
72
121
  return DuckDBSession(conn=connection)
73
122
 
74
123
 
@@ -0,0 +1,8 @@
1
+ {"commitInfo":{"timestamp":1725137989496,"operation":"WRITE","operationParameters":{"mode":"ErrorIfExists","partitionBy":"[]"},"isolationLevel":"Serializable","isBlindAppend":true,"operationMetrics":{"numFiles":"6","numOutputRows":"5","numOutputBytes":"7800"},"engineInfo":"Apache-Spark/3.5.2 Delta-Lake/3.2.0","txnId":"17633aa0-b065-49d6-9893-022103f7364e"}}
2
+ {"metaData":{"id":"73709a6c-bb75-4ac7-a78e-635400886d74","format":{"provider":"parquet","options":{}},"schemaString":"{\"type\":\"struct\",\"fields\":[{\"name\":\"employee_id\",\"type\":\"integer\",\"nullable\":true,\"metadata\":{}},{\"name\":\"fname\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}},{\"name\":\"lname\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}},{\"name\":\"age\",\"type\":\"integer\",\"nullable\":true,\"metadata\":{}},{\"name\":\"store_id\",\"type\":\"integer\",\"nullable\":true,\"metadata\":{}}]}","partitionColumns":[],"configuration":{},"createdTime":1725137987547}}
3
+ {"protocol":{"minReaderVersion":1,"minWriterVersion":2}}
4
+ {"add":{"path":"part-00002-3fed7f18-370f-4b16-b232-504d6194eb52-c000.snappy.parquet","partitionValues":{},"size":1437,"modificationTime":1725137989427,"dataChange":true,"stats":"{\"numRecords\":1,\"minValues\":{\"employee_id\":1,\"fname\":\"Jack\",\"lname\":\"Shephard\",\"age\":37,\"store_id\":1},\"maxValues\":{\"employee_id\":1,\"fname\":\"Jack\",\"lname\":\"Shephard\",\"age\":37,\"store_id\":1},\"nullCount\":{\"employee_id\":0,\"fname\":0,\"lname\":0,\"age\":0,\"store_id\":0}}"}}
5
+ {"add":{"path":"part-00004-143c5da1-d5ab-4706-8e84-0d2a324c6894-c000.snappy.parquet","partitionValues":{},"size":1417,"modificationTime":1725137989428,"dataChange":true,"stats":"{\"numRecords\":1,\"minValues\":{\"employee_id\":2,\"fname\":\"John\",\"lname\":\"Locke\",\"age\":65,\"store_id\":1},\"maxValues\":{\"employee_id\":2,\"fname\":\"John\",\"lname\":\"Locke\",\"age\":65,\"store_id\":1},\"nullCount\":{\"employee_id\":0,\"fname\":0,\"lname\":0,\"age\":0,\"store_id\":0}}"}}
6
+ {"add":{"path":"part-00006-64f07e25-c30e-4075-acc6-b3c69c4ce80b-c000.snappy.parquet","partitionValues":{},"size":1424,"modificationTime":1725137989428,"dataChange":true,"stats":"{\"numRecords\":1,\"minValues\":{\"employee_id\":3,\"fname\":\"Kate\",\"lname\":\"Austen\",\"age\":37,\"store_id\":2},\"maxValues\":{\"employee_id\":3,\"fname\":\"Kate\",\"lname\":\"Austen\",\"age\":37,\"store_id\":2},\"nullCount\":{\"employee_id\":0,\"fname\":0,\"lname\":0,\"age\":0,\"store_id\":0}}"}}
7
+ {"add":{"path":"part-00008-89ccad8d-df73-4ad5-8850-82ef3884db60-c000.snappy.parquet","partitionValues":{},"size":1459,"modificationTime":1725137989427,"dataChange":true,"stats":"{\"numRecords\":1,\"minValues\":{\"employee_id\":4,\"fname\":\"Claire\",\"lname\":\"Littleton\",\"age\":27,\"store_id\":2},\"maxValues\":{\"employee_id\":4,\"fname\":\"Claire\",\"lname\":\"Littleton\",\"age\":27,\"store_id\":2},\"nullCount\":{\"employee_id\":0,\"fname\":0,\"lname\":0,\"age\":0,\"store_id\":0}}"}}
8
+ {"add":{"path":"part-00010-812b3382-8c7f-4c4e-9bcd-09ce8664f6e0-c000.snappy.parquet","partitionValues":{},"size":1417,"modificationTime":1725137989428,"dataChange":true,"stats":"{\"numRecords\":1,\"minValues\":{\"employee_id\":5,\"fname\":\"Hugo\",\"lname\":\"Reyes\",\"age\":29,\"store_id\":100},\"maxValues\":{\"employee_id\":5,\"fname\":\"Hugo\",\"lname\":\"Reyes\",\"age\":29,\"store_id\":100},\"nullCount\":{\"employee_id\":0,\"fname\":0,\"lname\":0,\"age\":0,\"store_id\":0}}"}}
@@ -0,0 +1,23 @@
1
+ WITH customer_total_return AS
2
+ (SELECT sr_customer_sk AS ctr_customer_sk,
3
+ sr_store_sk AS ctr_store_sk,
4
+ sum(sr_return_amt) AS ctr_total_return
5
+ FROM store_returns,
6
+ date_dim
7
+ WHERE sr_returned_date_sk = d_date_sk
8
+ AND d_year = 2000
9
+ GROUP BY sr_customer_sk,
10
+ sr_store_sk)
11
+ SELECT c_customer_id
12
+ FROM customer_total_return ctr1,
13
+ store,
14
+ customer
15
+ WHERE ctr1.ctr_total_return >
16
+ (SELECT avg(ctr_total_return)*1.2
17
+ FROM customer_total_return ctr2
18
+ WHERE ctr1.ctr_store_sk = ctr2.ctr_store_sk)
19
+ AND s_store_sk = ctr1.ctr_store_sk
20
+ AND s_state = 'TN'
21
+ AND ctr1.ctr_customer_sk = c_customer_sk
22
+ ORDER BY c_customer_id
23
+ LIMIT 100;
@@ -0,0 +1,65 @@
1
+ SELECT cd_gender,
2
+ cd_marital_status,
3
+ cd_education_status,
4
+ count(*) cnt1,
5
+ cd_purchase_estimate,
6
+ count(*) cnt2,
7
+ cd_credit_rating,
8
+ count(*) cnt3,
9
+ cd_dep_count,
10
+ count(*) cnt4,
11
+ cd_dep_employed_count,
12
+ count(*) cnt5,
13
+ cd_dep_college_count,
14
+ count(*) cnt6
15
+ FROM customer c,
16
+ customer_address ca,
17
+ customer_demographics
18
+ WHERE c.c_current_addr_sk = ca.ca_address_sk
19
+ AND ca_county IN ('Rush County',
20
+ 'Toole County',
21
+ 'Jefferson County',
22
+ 'Dona Ana County',
23
+ 'La Porte County')
24
+ AND cd_demo_sk = c.c_current_cdemo_sk
25
+ AND EXISTS
26
+ (SELECT *
27
+ FROM store_sales,
28
+ date_dim
29
+ WHERE c.c_customer_sk = ss_customer_sk
30
+ AND ss_sold_date_sk = d_date_sk
31
+ AND d_year = 2002
32
+ AND d_moy BETWEEN 1 AND 1+3)
33
+ AND (EXISTS
34
+ (SELECT *
35
+ FROM web_sales,
36
+ date_dim
37
+ WHERE c.c_customer_sk = ws_bill_customer_sk
38
+ AND ws_sold_date_sk = d_date_sk
39
+ AND d_year = 2002
40
+ AND d_moy BETWEEN 1 AND 1+3)
41
+ OR EXISTS
42
+ (SELECT *
43
+ FROM catalog_sales,
44
+ date_dim
45
+ WHERE c.c_customer_sk = cs_ship_customer_sk
46
+ AND cs_sold_date_sk = d_date_sk
47
+ AND d_year = 2002
48
+ AND d_moy BETWEEN 1 AND 1+3))
49
+ GROUP BY cd_gender,
50
+ cd_marital_status,
51
+ cd_education_status,
52
+ cd_purchase_estimate,
53
+ cd_credit_rating,
54
+ cd_dep_count,
55
+ cd_dep_employed_count,
56
+ cd_dep_college_count
57
+ ORDER BY cd_gender,
58
+ cd_marital_status,
59
+ cd_education_status,
60
+ cd_purchase_estimate,
61
+ cd_credit_rating,
62
+ cd_dep_count,
63
+ cd_dep_employed_count,
64
+ cd_dep_college_count
65
+ LIMIT 100;