Views
No views yet
| Language | Pass Rate |
|---|---|
| SQL | 29% |
| HiveQL | 32% |
| PL/SQL | 27% |
| Stored Procedure | 20% |
| Overall | 27% |
syntax_valid AND has_pyspark_ops AND semantic_sim (60% table name coverage).### Instruction:
Convert the following {SOURCE_LANGUAGE} code to PySpark.
Difficulty: {difficulty}
### Input:
{source_code}
### Response:1SELECT user_id, tag
2FROM user_tags
3LATERAL VIEW EXPLODE(tags) t AS tag
4WHERE size(tags) > 0
5DISTRIBUTE BY user_id
6SORT BY tag;1from pyspark.sql import functions as F
2
3result = (
4 user_tags
5 .filter(F.size('tags') > 0)
6 .select('user_id', F.explode('tags').alias('tag'))
7 .repartition('user_id')
8 .sortWithinPartitions('tag')
9)
10result.show()| Model | Params | Overall | Train Loss | Eval Loss |
|---|---|---|---|---|
| deepseek-coder-1.3b (this) | 1.3B | 27% | 0.258 | 0.329 |
| qwen2.5-coder-1.5b | 1.5B | 45% | 0.307 | 0.344 |
| phi-3.5-mini | 3.8B | 57% | 2.133 | 0.294 |